From afcd98a29dbf960e590aace324bfc11acf91f736 Mon Sep 17 00:00:00 2001 From: "Jurgen J. Vinju" Date: Fri, 12 Jan 2024 17:29:38 +0100 Subject: [PATCH] added original methods closure() and closureStar back in for backward compatibility --- .../java/io/usethesource/vallang/IRelation.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/main/java/io/usethesource/vallang/IRelation.java b/src/main/java/io/usethesource/vallang/IRelation.java index 77217a87..e90033ae 100644 --- a/src/main/java/io/usethesource/vallang/IRelation.java +++ b/src/main/java/io/usethesource/vallang/IRelation.java @@ -79,6 +79,14 @@ public default C compose(IRelation that) { return w.done(); } + /** + * @return the transitive non-reflexive closure of a binary relation + * @throws UnsupportedOperationException when the receiver is not a binary relation + */ + public default C closure() { + return closure(false); + } + /** * @return the transitive non-reflexive closure of a binary relation * @param forceDepthFirst chooses the DFS algorithm over the BFS algorithm even though the size is small @@ -100,6 +108,14 @@ public default C closure(boolean forceDepthFirst) { return next; } + /** + * @return the transitive non-reflexive closure of a binary relation + * @throws UnsupportedOperationException when the receiver is not a binary relation + */ + public default C closureStar() { + return closureStar(false); + } + /** * @return the transitive reflexive closure of a binary relation * @param forceDepthFirst chooses the DFS algorithm over the BFS algorithm even though the size is small