def test_mmlhs(self): lh = LatinHypercube(rand_latin_hypercube(10,2), 2, 1) phi1 = lh.mmphi() lh_opt = _mmlhs(lh, 20, 20) opt_phi = lh_opt.mmphi() self.assertTrue(is_latin_hypercube(lh_opt)) self.assertTrue(opt_phi < phi1)
def test_OptLatinHypercube(self): olh = OptLatinHypercube() olh.num_sample_points = 10 olh.num_parameters = 2 z = zeros((olh.num_sample_points, olh.num_parameters)) for i,row in enumerate(olh): z[i,:] = row self.assertTrue(is_latin_hypercube(z))