/* Written by Sven Verdoolaege, K.U.Leuven, Departement Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium  */
static struct isl_vec* isl_vec_lin_to_aff(struct isl_vec *vec)
/* Written by Sven Verdoolaege, K.U.Leuven, Departement Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium  */
static struct isl_vec* isl_vec_lin_to_aff(struct isl_vec *vec)
{
	struct isl_vec *aff;
	if (!vec)
		return NULL;
	aff = isl_vec_alloc(vec->ctx, 1 + vec->size);
	if (!aff)
		goto error;
	isl_int_set_si(aff->el[0], 0);
	isl_seq_cpy(aff->el + 1, vec->el, vec->size);
	isl_vec_free(vec);
	return aff;
error:
	isl_vec_free(vec);
	return NULL;
}