@@ -358,17 +358,17 @@ function random_rothe_matrix(F::Field, p::PermGroupElem)
358
358
n = degree (parent (p))
359
359
u = identity_matrix (F, n)
360
360
for (i, j) in inversions (p)
361
- u[i, j] = F (rand (1 : char - 1 ))
361
+ u[i, j] = F (rand (1 : range ))
362
362
end
363
363
return u * permutation_matrix (F, p)
364
364
end
365
365
366
- function random_shift (F:: QQField , K:: ComplexOrHypergraph , p:: PermGroupElem ; )
366
+ function random_shift (F:: QQField , K:: ComplexOrHypergraph , p:: PermGroupElem )
367
367
n = n_vertices (K)
368
368
exterior_shift (K, random_rothe_matrix (F, p))
369
369
end
370
370
371
- function random_shift (F:: Field , K:: ComplexOrHypergraph , p:: PermGroupElem ; )
371
+ function random_shift (F:: Field , K:: ComplexOrHypergraph , p:: PermGroupElem )
372
372
n = n_vertices (K)
373
373
exterior_shift (K, random_rothe_matrix (F, p))
374
374
end
@@ -414,6 +414,20 @@ function check_shifted(F::Field, src::SimplicialComplex,
414
414
end
415
415
416
416
function exterior_shift_lv (F:: Field , K:: ComplexOrHypergraph , p:: PermGroupElem )
417
+ # this might need to be changed based on the characteristic
418
+ # we expect that the larger the characteristic the smaller the sample needs to be
419
+ # setting to 100 now for good measure
420
+ sample_size = 100
421
+ shift = partialsort! ([random_shift (F, K, p) for _ in 1 : sample_size], 1 ;
422
+ lt= isless_lex)
423
+
424
+ check_shifted (F, K, shift, p) && return shift
425
+
426
+ # this should be updated to not throw an error
427
+ error (" Could not find the full shift using $sample_size samples" )
428
+ end
429
+
430
+ function exterior_shift_lv (F:: QQField , K:: ComplexOrHypergraph , p:: PermGroupElem )
417
431
shift = random_shift (F, K, p)
418
432
count = 1
419
433
while ! check_shifted (F, K, shift, p)
0 commit comments