intervals.h 929 Bytes
/*
 * intervals.h
 *
 *  Created on: 26/07/2016
 *      Author: pedro
 */

#ifndef SRC_INTERVALS_H_
#define SRC_INTERVALS_H_

#include <stdbool.h>

#include "config.h"
#include "constraints.h"

void i_set_1st_ushort(interval* d, unsigned short val);
void i_copy(interval* d_dest, interval* d_src);
void i_and_b(bitmap* b_dest, interval* i_src);
bool i_is_empty(interval* d);
unsigned short i_get_1st_ushort(interval* d);
unsigned int i_get_min_val(interval* i);
unsigned int i_get_max_val(interval* i);
bool is_eq(interval* d1, interval* d2);
bool i_eq_b_var(interval* d, var* v);

void set_interval_domains();
void convert_bitmaps_to_intervals(interval* intervals, bitmap* bitmaps, unsigned int n_domains);
void convert_intervals_to_vars(var* variables, interval* intervals, unsigned int n_domains);
void convert_intervals_to_bitmaps(bitmap* bitmaps, interval* intervals, unsigned int n_domains);

#endif /* SRC_INTERVALS_H_ */