petrelharp / treestats_ms

1 stars 1 forks source link

Notation: use Iversonians for complicated sums? #9

Closed jeromekelleher closed 5 years ago

jeromekelleher commented 5 years ago

As a dyed-in-the-wool Knuthian, I found myself wanting to use Iversonian brackets in some of the more complicated sums. So, e.g., rather than

\sum_{v: g_j(v) = a} w(v)

do

\sum_{v} w(v)[g_j(v) = a]

Heresy?

molpopgen commented 5 years ago

I prefer this notation, and its I(x) variant. The down side is that you will have to rewrite all the algorithms in MIX!

petrelharp commented 5 years ago

Hm. I'm not opposed, but there are two downsides: this is not common (I have not seen it ever outside of Knuth), and writing it as a restriction on the sum makes it more clear how many things you are summing over. Do you have counter-arguments in favor of the brackets? larger fonts?

jeromekelleher commented 5 years ago

Nah, let's leave it as it is. We're using square brackets for other stuff (intervals and table row access), so it'll just end up being confusing to most people probably.