Skip to content

Commit d2fd4fe

Browse files
Apply suggestion from @james-d-mitchell
If I understand correctly, InDegrees is faster than InDegreeOfVertexNC here due to caching behaviour where the in degrees of the digraph are computed once then looked up from cache, as opposed to the other function which has to recompute for each input vertex. Co-authored-by: James Mitchell <james-d-mitchell@users.noreply.github.com>
1 parent 8ae6cba commit d2fd4fe

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

gap/oper.gi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2733,7 +2733,7 @@ function(D, v)
27332733
fi;
27342734
hasse := DigraphReflexiveTransitiveReduction(DigraphMutableCopyIfMutable(D));
27352735
# join-irreducible iff at most one lower cover in the Hasse diagram
2736-
return InDegreeOfVertexNC(hasse, v) <= 1;
2736+
return InDegrees(hasse)[v] <= 1;
27372737
end);
27382738

27392739
InstallMethod(IsMeetIrreducible,

0 commit comments

Comments
 (0)