98 for (i = 0; i < list->
n_values; i++) {
99 if (val == list->
value[i])
104 size = (list->
n_values + 1000) *
sizeof(
int);
131 for (i = 0; i < blist->
n_values; i++)
153 for (i = 0; i < list->
n_values; i++) {
154 if (val == list->
value[i]) {
155 for (j = i + 1; j < list->
n_values; j++)
182 for (i = 0; i < blist->
n_values; i++)
204 for (i = 0; i < list->
n_values; i++) {
205 if (val == list->
value[i])
296 for (i = 0; i < list->
n_values; i++) {
297 if (
id == list->
id[i])
302 size = (list->
n_values + 1000) *
sizeof(
int);
338 for (i = 0; i < blist->
n_values; i++)
344 box.
E = box.
W = box.
N = box.
S = box.
T = box.
B = 0;
345 for (i = 0; i < blist->
n_values; i++)
368 for (i = 0; i < list->
n_values; i++) {
369 if (
id == list->
id[i]) {
370 for (j = i + 1; j < list->
n_values; j++) {
371 list->
id[j - 1] = list->
id[j];
373 list->
box[j - 1] = list->
box[j];
400 for (i = 0; i < blist->
n_values; i++)
422 for (i = 0; i < list->
n_values; i++) {
423 if (
id == list->
id[i])
struct boxlist * Vect_new_boxlist(int have_boxes)
Creates and initializes a struct boxlist.
int Vect_list_append_list(struct ilist *alist, const struct ilist *blist)
Append new items to the end of list if not yet present.
int Vect_val_in_boxlist(const struct boxlist *list, int id)
Find a given item in the list.
int Vect_boxlist_append(struct boxlist *list, int id, const struct bound_box *box)
Append new item to the end of list if not yet present.
void Vect_destroy_list(struct ilist *list)
Frees all memory associated with a struct ilist, including the struct itself.
struct ilist * Vect_new_list(void)
Creates and initializes a struct ilist.
int Vect_list_delete(struct ilist *list, int val)
Remove a given value (item) from list.
void Vect_destroy_boxlist(struct boxlist *list)
Frees all memory associated with a struct boxlist, including the struct itself.
int n_values
Number of values in the list.
void G_free(void *)
Free allocated memory.
int n_values
Number of items in the list.
struct bound_box * box
Array of bounding boxes.
int Vect_boxlist_delete_boxlist(struct boxlist *alist, const struct boxlist *blist)
Delete list from existing list.
int Vect_reset_list(struct ilist *list)
Reset ilist structure.
int Vect_list_append(struct ilist *list, int val)
Append new item to the end of list if not yet present.
int Vect_boxlist_append_boxlist(struct boxlist *alist, const struct boxlist *blist)
Append new items to the end of list if not yet present.
int alloc_values
Allocated space for values.
int have_boxes
flag to indicate whether bounding boxes should be added
int alloc_values
Allocated space for items.
List of bounding boxes with id.
int Vect_val_in_list(const struct ilist *list, int val)
Find a given item in the list.
int * value
Array of values.
int Vect_reset_boxlist(struct boxlist *list)
Reset boxlist structure.
int Vect_list_delete_list(struct ilist *alist, const struct ilist *blist)
Delete list from existing list.
int Vect_boxlist_delete(struct boxlist *list, int id)
Remove a given value (item) from list.