Skip to content

Commit

Permalink
Simplify nonCirculant conditional
Browse files Browse the repository at this point in the history
  • Loading branch information
gselzer committed Apr 4, 2024
1 parent 3b27e31 commit e008a8a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -226,15 +226,14 @@ public RandomAccessibleInterval<O> apply(RandomAccessibleInterval<I> input,
// out of bounds factory will be different depending on if circulant or
// non-circulant is used
if (obfInput == null) {

if (!nonCirculant) {
obfInput = new OutOfBoundsMirrorFactory<>(
OutOfBoundsMirrorFactory.Boundary.SINGLE);
}
else if (nonCirculant) {
if (nonCirculant) {
obfInput = new OutOfBoundsConstantValueFactory<>(Util
.getTypeFromInterval(input).createVariable());
}
else {
obfInput = new OutOfBoundsMirrorFactory<>(
OutOfBoundsMirrorFactory.Boundary.SINGLE);
}
}

// default to no acceleration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,15 +219,14 @@ public RandomAccessibleInterval<O> apply(RandomAccessibleInterval<I> input,
// out of bounds factory will be different depending on if circulant or
// non-circulant is used
if (obfInput == null) {

if (!nonCirculant) {
obfInput = new OutOfBoundsMirrorFactory<>(
OutOfBoundsMirrorFactory.Boundary.SINGLE);
}
else if (nonCirculant) {
if (nonCirculant) {
obfInput = new OutOfBoundsConstantValueFactory<>(Util
.getTypeFromInterval(input).createVariable());
}
else {
obfInput = new OutOfBoundsMirrorFactory<>(
OutOfBoundsMirrorFactory.Boundary.SINGLE);
}
}

// default to no acceleration
Expand Down

0 comments on commit e008a8a

Please sign in to comment.