blob: f45f0d2e367fb3e3836faafddfce70e310d47f9d (
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
29
30
31
32
33
|
/*
* SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
*
* SPDX-License-Identifier: EPL-2.0
*/
package tools.refinery.store.statecoding.stateequivalence;
import org.eclipse.collections.api.map.primitive.IntIntMap;
import org.eclipse.collections.api.set.primitive.IntSet;
import java.util.List;
public interface NodePairing {
int size();
List<IntIntMap> permutations();
boolean isComplete();
static NodePairing constructNodePairing(IntSet left, IntSet right){
if(left.size() != right.size()) {
return null;
}
if(left.size() == 1) {
int leftValue = left.intIterator().next();
int rightValue = right.intIterator().next();
return new TrivialNodePairing(leftValue, rightValue);
} else {
return new CombinationNodePairing(left,right);
}
}
}
|