aboutsummaryrefslogtreecommitdiffstats
path: root/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/context/IPosetComparator.java
blob: e2d5bcee8e818f70b20be17aea391fe1e54b6658 (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
34
35
/*******************************************************************************
 * Copyright (c) 2010-2016, Tamas Szabo, Istvan Rath and Daniel Varro
 * This program and the accompanying materials are made available under the
 * terms of the Eclipse Public License v. 2.0 which is available at
 * http://www.eclipse.org/legal/epl-v20.html.
 * 
 * SPDX-License-Identifier: EPL-2.0
 *******************************************************************************/
package tools.refinery.viatra.runtime.matchers.context;

import tools.refinery.viatra.runtime.matchers.tuple.Tuple;

/**
 * Implementations of this interface aid the query engine with the ordering of poset elements. This information is
 * particularly important in the delete and re-derive evaluation mode because they let the engine identify monotone
 * change pairs.
 * 
 * @author Tamas Szabo
 * @since 1.6
 */
public interface IPosetComparator {

    /**
     * Returns true if the 'left' tuple of poset elements is smaller or equal than the 'right' tuple of poset elements according to
     * the partial order that this poset comparator employs. 
     * 
     * @param left
     *            the left tuple of poset elements
     * @param right
     *            the right tuple of poset elements
     * @return true if left is smaller or equal to right, false otherwise
     */
    public boolean isLessOrEqual(final Tuple left, final Tuple right);

}