diff options
author | 2019-05-10 12:05:10 -0400 | |
---|---|---|
committer | 2019-05-10 12:12:37 -0400 | |
commit | 3ab6f907e44d993830bad4d25a8b03811731c481 (patch) | |
tree | a1cfc14aef44888542754852472edb261680a335 /Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/interval/IntervalAggregationMode.java | |
parent | Neutral element for sum is [0, 0] (diff) | |
download | VIATRA-Generator-3ab6f907e44d993830bad4d25a8b03811731c481.tar.gz VIATRA-Generator-3ab6f907e44d993830bad4d25a8b03811731c481.tar.zst VIATRA-Generator-3ab6f907e44d993830bad4d25a8b03811731c481.zip |
More aggregation operators
Diffstat (limited to 'Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/interval/IntervalAggregationMode.java')
-rw-r--r-- | Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/interval/IntervalAggregationMode.java | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/interval/IntervalAggregationMode.java b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/interval/IntervalAggregationMode.java index 66dcb00f..f106e305 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/interval/IntervalAggregationMode.java +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/interval/IntervalAggregationMode.java | |||
@@ -27,6 +27,30 @@ public enum IntervalAggregationMode implements BinaryOperator<Interval> { | |||
27 | return Interval.ZERO; | 27 | return Interval.ZERO; |
28 | } | 28 | } |
29 | }, | 29 | }, |
30 | |||
31 | MIN("intervalMin", "Find the minimum a set of intervals") { | ||
32 | @Override | ||
33 | public IntervalRedBlackNode createNode(Interval interval) { | ||
34 | return new IntervalRedBlackNode(interval) { | ||
35 | @Override | ||
36 | public Interval op(Interval left, Interval right) { | ||
37 | return left.min(right); | ||
38 | } | ||
39 | }; | ||
40 | } | ||
41 | }, | ||
42 | |||
43 | MAX("intervalMax", "Find the maximum a set of intervals") { | ||
44 | @Override | ||
45 | public IntervalRedBlackNode createNode(Interval interval) { | ||
46 | return new IntervalRedBlackNode(interval) { | ||
47 | @Override | ||
48 | public Interval op(Interval left, Interval right) { | ||
49 | return left.max(right); | ||
50 | } | ||
51 | }; | ||
52 | } | ||
53 | }, | ||
30 | 54 | ||
31 | JOIN("intervalJoin", "Calculate the smallest interval containing all the intervals in a set") { | 55 | JOIN("intervalJoin", "Calculate the smallest interval containing all the intervals in a set") { |
32 | @Override | 56 | @Override |