This file contains 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
// Credit to Jeff Preshing | |
// https://preshing.com/20121224/how-to-generate-a-sequence-of-unique-random-integers/ | |
class RandomSequenceOfUnique { | |
constructor(intermediateOffset, seedBase=1) { | |
this.index = permuteQPR(permuteQPR(seedBase) + 0x682f0161); | |
this.intermediateOffset = intermediateOffset; | |
} | |
getNext() { | |
const next = this.getNth(this.index); |
This file contains 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
from scipy.stats import friedmanchisquare, rankdata, norm | |
from scipy.special import gammaln | |
import numpy as np | |
# consistent with https://cran.r-project.org/web/packages/PMCMR/vignettes/PMCMR.pdf p. 17 | |
def test_nemenyi(): | |
data = np.asarray([(3.88, 5.64, 5.76, 4.25, 5.91, 4.33), (30.58, 30.14, 16.92, 23.19, 26.74, 10.91), | |
(25.24, 33.52, 25.45, 18.85, 20.45, 26.67), (4.44, 7.94, 4.04, 4.4, 4.23, 4.36), | |
(29.41, 30.72, 32.92, 28.23, 23.35, 12), (38.87, 33.12, 39.15, 28.06, 38.23, 26.65)]) |
This file contains 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
from sys import argv | |
width = 0 | |
height = 0 | |
def loadMap(filename): | |
with open(filename, 'r') as f: | |
global width | |
global height | |
height, width = [int(x) for x in f.readline().split()] |