From 6de82436d3ab5f9288a527875666c8e1a1e60580 Mon Sep 17 00:00:00 2001 From: zljlzljlz Date: Wed, 9 Oct 2024 15:59:22 +0100 Subject: [PATCH] Added IsOrderFilter --- gap/oper.gd | 1 + gap/oper.gi | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/gap/oper.gd b/gap/oper.gd index e3c14d3dd..5c9f6878a 100644 --- a/gap/oper.gd +++ b/gap/oper.gd @@ -142,6 +142,7 @@ DeclareOperation("DigraphShortestPathSpanningTree", [IsDigraph, IsPosInt]); DeclareOperation("VerticesReachableFrom", [IsDigraph, IsPosInt]); DeclareOperation("VerticesReachableFrom", [IsDigraph, IsList]); DeclareOperation("IsOrderIdeal", [IsDigraph, IsList]); +DeclareOperation("IsOrderFilter", [IsDigraph, IsList]); DeclareOperation("Dominators", [IsDigraph, IsPosInt]); DeclareOperation("DominatorTree", [IsDigraph, IsPosInt]); DeclareOperation("DigraphCycleBasis", [IsDigraph]); diff --git a/gap/oper.gi b/gap/oper.gi index 5703ec7a5..b22411d3a 100644 --- a/gap/oper.gi +++ b/gap/oper.gi @@ -2312,6 +2312,11 @@ function(D, roots) end); +InstallMethod(IsOrderFilter, "for a digraph and a list of vertices", [IsDigraph, IsList], +function(D, roots) + return IsOrderIdeal(DigraphReverse(D), roots); +end); + InstallMethod(DominatorTree, "for a digraph and a vertex", [IsDigraph, IsPosInt], function(D, root)