MCPcopy Create free account
hub / github.com/KDE/labplot / psample

Function psample

src/backend/gsl/ExpressionParser.cpp:600–609  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

598}
599
600double psample(double n, const std::string_view& variable, const std::weak_ptr<Payload> payload) {
601 const auto p = std::dynamic_pointer_cast<PayloadExpressionParser>(payload.lock());
602 if (!p) {
603 assert(p); // Debug build
604 return NAN;
605 }
606
607 // every n-th value, starting @ first
608 return cell((int)n * p->row + 1, variable, payload);
609}
610
611double rsample(const std::string_view& variable, const std::weak_ptr<Payload> payload) {
612 const auto p = std::dynamic_pointer_cast<PayloadExpressionParser>(payload.lock());

Callers

nothing calls this directly

Calls 1

cellFunction · 0.85

Tested by

no test coverage detected