blob: 693b9e1f2963f5fc3921e3036840208a48c5c6c4 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
/*
* SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
*
* SPDX-License-Identifier: EPL-2.0
*/
package tools.refinery.language.semantics.internal;
import tools.refinery.store.reasoning.seed.Seed;
import tools.refinery.store.representation.TruthValue;
import tools.refinery.store.tuple.Tuple;
public interface MutableSeed<T> extends Seed<T> {
void mergeValue(Tuple tuple, T value);
void setIfMissing(Tuple tuple, T value);
void setAllMissing(T value);
void overwriteValues(MutableSeed<T> other);
static MutableSeed<TruthValue> of(int levels, TruthValue initialValue) {
if (levels == 0) {
return new NullaryMutableSeed(initialValue);
} else {
return new DecisionTree(levels, initialValue);
}
}
}
|