Blame view

src/constraints/ge.c 594 Bytes
94b2b13d   Pedro Roque   PHACT source
1
2
3
4
/*
 * ge.c
 *
 *  Created on: 22/01/2017
4d26a735   Pedro Roque   Increased recogni...
5
 *      Author: pedro
94b2b13d   Pedro Roque   PHACT source
6
7
8
 */

#include "ge.h"
4d26a735   Pedro Roque   Increased recogni...
9
10
#include "le.h"

94b2b13d   Pedro Roque   PHACT source
11
12
13
14
15
16
17
18
/*
 * Creates a new constraint of the ge type
 * x ≥ y
 * x_id - ID of variable x
 * y_id - ID of variable y
 */
unsigned int c_ge(unsigned int x_id, unsigned int y_id) {
	return c_le(y_id, x_id);
4d26a735   Pedro Roque   Increased recogni...
19
}
94b2b13d   Pedro Roque   PHACT source
20
21
22
23
24
25
26
27
28
29

/*
 * Creates a new reified constraint of the ge type
 * x ≥ y
 * x_id - ID of variable x
 * y_id - ID of variable y
 * reif_v_id - ID of the reification variable
 */
unsigned int c_ge_reif(unsigned int x_id, unsigned int y_id, int reif_v_id) {
	return c_le_reif(y_id, x_id, reif_v_id);
4d26a735   Pedro Roque   Increased recogni...
30
}
94b2b13d   Pedro Roque   PHACT source