Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Verification for Decision Model and Notation
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Container Registry
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jonas Blatt
Verification for Decision Model and Notation
Commits
92880396
Commit
92880396
authored
5 years ago
by
Jonas Blatt
Browse files
Options
Downloads
Patches
Plain Diff
#25
LONG INFINITY + 1 = -INFINITY -> this
parent
7b3061f9
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dmnverifierapi/src/main/java/de/unikoblenz/fgbks/base/utils/boundary/bicreater/BiCreaterAppend.java
+7
-3
7 additions, 3 deletions
.../fgbks/base/utils/boundary/bicreater/BiCreaterAppend.java
with
7 additions
and
3 deletions
dmnverifierapi/src/main/java/de/unikoblenz/fgbks/base/utils/boundary/bicreater/BiCreaterAppend.java
+
7
−
3
View file @
92880396
...
...
@@ -11,9 +11,11 @@ import java.util.Optional;
/**
* The combine creator implementation of {@link BoundaryBiCreaterType#APPEND} for {@link
* AbstractGrowingBoundary}. <br> The result is a new boundary with the combined range of both
* boundaries, or an empty optional, if the creation is not possible. Both boundaries are not in
* contact. <br> In: {@code b1: [10..30[; b2: [30..50]} <br> Out: {@code ]10..50[} <br>
* AbstractGrowingBoundary}. <br>
* The result is a new boundary with the combined range of both boundaries, or an empty optional, if
* the creation is not possible. Both boundaries are not in contact. <br>
* In: {@code b1: [10..30[; b2: [30..50]} <br>
* Out: {@code ]10..50[} <br>
*/
public
class
BiCreaterAppend
extends
AbstractBoundaryBiCreater
<
AbstractGrowingBoundary
>
{
...
...
@@ -108,6 +110,7 @@ public class BiCreaterAppend extends AbstractBoundaryBiCreater<AbstractGrowingBo
long
b2L
=
(
long
)
b2
.
getLowerBound
();
long
b2U
=
(
long
)
b2
.
getUpperBound
();
if
(
b1U
+
1
==
b2L
&&
b1
.
getMaxValue
().
compareTo
(
b1U
)
!=
0
&&
b1
.
getUpperBoundType
()
==
INCLUSIVE
&&
b2
.
getLowerBoundType
()
==
INCLUSIVE
)
{
return
Optional
.
of
(
...
...
@@ -117,6 +120,7 @@ public class BiCreaterAppend extends AbstractBoundaryBiCreater<AbstractGrowingBo
b1
.
getLowerBoundType
(),
b2
.
getUpperBoundType
()));
}
else
if
(
b2U
+
1
==
b1L
&&
b2
.
getMaxValue
().
compareTo
(
b2U
)
!=
0
&&
b2
.
getUpperBoundType
()
==
INCLUSIVE
&&
b1
.
getLowerBoundType
()
==
INCLUSIVE
)
{
return
Optional
.
of
(
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment