Skip to content

Commit

Permalink
fix #4465
Browse files Browse the repository at this point in the history
  • Loading branch information
lperron committed Dec 3, 2024
1 parent 6305c43 commit 1a9aada
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
10 changes: 8 additions & 2 deletions ortools/java/com/google/ortools/sat/AutomatonConstraint.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,14 @@ public AutomatonConstraint(CpModelProto.Builder builder) {
super(builder);
}

/// Adds a transitions to the automaton.
AutomatonConstraint addTransition(int tail, int head, long label) {
/**
* Adds a transitions to the automaton.
*
* @param head the head of the transition
* @param label the label of the transition
* @return this constraint
*/
public AutomatonConstraint addTransition(int tail, int head, long label) {
getBuilder()
.getAutomatonBuilder()
.addTransitionTail(tail)
Expand Down
10 changes: 8 additions & 2 deletions ortools/java/com/google/ortools/sat/NoOverlap2dConstraint.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,20 @@
/**
* Specialized NoOverlap2D constraint.
*
* <p>This constraint allows adding rectanles to the NoOverlap2D constraint incrementally.
* <p>This constraint allows adding rectangles to the NoOverlap2D constraint incrementally.
*/
public class NoOverlap2dConstraint extends Constraint {
public NoOverlap2dConstraint(CpModelProto.Builder builder) {
super(builder);
}

/// Adds a rectangle (xInterval, yInterval) to the constraint.
/**
* Adds a rectangle (xInterval, yInterval) to the constraint.
*
* @param xInterval the x interval of the rectangle.
* @param yInterval the y interval of the rectangle.
* @return this constraint
*/
public NoOverlap2dConstraint addRectangle(IntervalVar xInterval, IntervalVar yInterval) {
NoOverlap2DConstraintProto.Builder noOverlap2d = getBuilder().getNoOverlap2DBuilder();
noOverlap2d.addXIntervals(xInterval.getIndex());
Expand Down

0 comments on commit 1a9aada

Please sign in to comment.