RSSAmplifier

Blog

The Sparkelling Bedangler

Ramblings about programming and related topics. Might go other places in the future.

morwenn.github.ioRSS feed ↗10 posts

Latest posts

Relationship between Amp and Mono

In this article, we analyze the relationship between the measure of disorder \(\mathit{Amp}\), which I introduced a while ago, and another measure of disorder: \(\mathit{Mono}\), the number of monotonic runs into which a sequence can be decomposed. Identity of \(\mathit{Mono}\) \(\mathit{Mono}\) is a measure of disorder originally described in Sort Race by H. Zhang, B. Meng and Y. Liang:…

Quantity-safe analog literals

Analog literals Analog literals are a cute C++ gadget proposed by Eelis in the seminal article Multi-Dimensional Analog Literals. That forward-thinking monument to human mischief finally allowed C++ developers to represent lines, squares and cuboids directly in code: using namespace analog_literals::symbols; assert( ( o-------------o |L \ | L \ | L \ | o-------------o | ! ! ! ! ! o | ! L | ! L | !…

Pairwise order of a sequence of elements

In the very first post of this blog, I described a new measure of disorder which I called \(\mathit{Amp}\). I started its construction process by introducing what I dubbed the pairwise order of a sequence as follows: A few days ago I went back to one of the simplest possible tools in the domain: a three-way comparator for two values: \[\mathit{comp}(x, y)= \begin{cases} 1 & \text{ if } x \lt y\\…

Amp and the partial ordering of measures of disorder, part 2

In the first part of this series, we analyzed different techniques used to compare measures of disorder and to construct a partial order thereof. We then tried to apply that newfound knowledge to narrow down the place of \(\mathit{Amp}\) in the partial order. That work remains unfinished as we haven’t yet learnt how to formally prove that a measure is “better” that another one. We instead settled…

Amp and the partial ordering of measures of disorder, part 1

Shortly after computer scientists had proposed their first few measures of disorder, they started feeling an urge to show that their favourite measure was different from existing ones, and that they could actually come up with a single measure that was better than all the ones described by competitors. Oozing manly energy, they reached for their best analytical tools, laid their most complicated…

Relationship between Amp and Runs

In this article, we analyze the relationship between the measure of disorder \(\mathit{Amp}\), which I introduced a while ago, and the classic measure of presortedness \(\mathit{Runs}\), the number of ascending runs in a sequence.

How much disorder is there in a descending run?

In a previous article, I introduced a new measure of disorder that I called \(\mathit{Amp}\), and attempted to determine whether it was a measure of presortedness. While trying to formally prove each of the 5 axioms required for a measure of presortedness, I discovered a counterexample showing that my measure did not satisfy the 4th axiom:

Symmetry of Amp

In a previous article, I introduced a new measure of disorder that I called \(\mathit{Amp}\) and attempted to determine whether it is a measure of presortedness (it is not). In this short note, I am going to demonstrate another property of \(\mathit{Amp}\): its symmetry over the input sequence. That is:

std::flip

std::flip is a little-known utility from the C++ standard library header <functional>: it is a higher-order function that accepts a Callable and returns an equivalent Callable with the order of its parameters reversed (or “flipped”).

Exc is not a measure of presortedness

Introduction