Skip to content

Commit

Permalink
added original methods closure() and closureStar back in for backward…
Browse files Browse the repository at this point in the history
… compatibility
  • Loading branch information
jurgenvinju committed Jan 12, 2024
1 parent c5f0f09 commit afcd98a
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/main/java/io/usethesource/vallang/IRelation.java
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,14 @@ public default C compose(IRelation<C> 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
Expand All @@ -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
Expand Down

0 comments on commit afcd98a

Please sign in to comment.