Subject: [dbound] Questions about the _odup algorithm

From: "Kurt Andersen (b)" <[email-masked]>
Date: Sat, 7 Nov 2015 08:37:44 -0800

Citing a pastebin copy of Appendix A (for line numbering):
http://pastebin.com/iYziF5LW

Perhaps it is a syntax misunderstanding, but it looks to me like line 44
ends up setting subDomainLabels to -1 and from there I'm a bit lost. It
might be because of the mix of ordering in the label arrays (8..3) is
throwing me a bit off (usually handle arrays from min..max).

Can you clarify?

Thanks,
  Kurt Andersen

---

From: Casey Deccio <[email-masked]>
Date: Sat, 7 Nov 2015 12:03:47 -0500

> throwing me a bit off (usually handle arrays from min..max).

Hi Kurt,

Thanks for the question--and for taking the time to read into the draft.

Line 44 would only set subDomainLabels to -1 if both n and orgBoundary are
0.  But that is the base case, handled in lines 26 - 42.  You only arrive
at line 44 if n != orgBoundary.  Combine that with the constraint that 0 <=
orgBoundary <= n (line 7), then when you arrive at line 44, n is always
greater than orgBoundary, which means subDomainLabels is always greater
than or equal to 0.

When I initially wrote up the pseudo code, it made sense to me to use
1-based sequence indexing.  I can look into whether it makes sense to use
0-based sequence indexing.  There might pros and cons to both, but the most
important thing is that it is correct :)

I have some working code that I'll post early next week (hopefully Monday).

Casey