Last active
August 10, 2018 07:18
-
-
Save fieldAbyss/c3bf425cfe2e349e863f43fbec99ad00 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# RCI | |
ord(seq, idx, itv) => | |
p = seq[idx] | |
o = 1 | |
for i = 0 to itv - 1 | |
if p < seq[i] | |
o := o + 1 | |
o | |
d(itv) => | |
sum = 0.0 | |
for i = 0 to itv - 1 | |
sum := sum + pow((i + 1) - ord(src, i, itv), 2) | |
sum | |
rci(itv) => (1.0 - 6.0 * d(itv) / (itv * (itv * itv - 1.0))) * 100.0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment