Graph Convolutional Branch and Bound v1.0.0
A TSP solver that combines a graph convolutional network with a 1-Tree branch-and-bound.
|
All the functions needed to manage the list of open subproblems. More...
#include "b_and_b_data.h"
Go to the source code of this file.
All the functions needed to manage the list of open subproblems.
Repo: https://github.com/LorenzoSciandra/GraphConvolutionalBranchandBound
Definition in file b_and_b_data.c.
void add_elem_SubProblemList_bottom | ( | SubProblemsList * | list, |
SubProblem * | element | ||
) |
Add a SubProblem to the bottom of a SubProblem List.
list | The SubProblem List to modify. |
element | The SubProblem to add. |
Definition at line 59 of file b_and_b_data.c.
void add_elem_SubProblemList_index | ( | SubProblemsList * | list, |
SubProblem * | element, | ||
size_t | index | ||
) |
Add a SubProblem at a specific index of a SubProblem List.
list | The SubProblem List to modify. |
element | The SubProblem to add. |
index | The index where to add the SubProblem. |
list is clearer way but it is already checked inside get_list_size
Definition at line 75 of file b_and_b_data.c.
SubProblemElem * build_list_elem | ( | SubProblem * | value, |
SubProblemElem * | next, | ||
SubProblemElem * | prev | ||
) |
Definition at line 44 of file b_and_b_data.c.
SubProblemsListIterator * create_SubProblemList_iterator | ( | SubProblemsList * | list | ) |
Create a new SubProblem List iterator on a SubProblem List.
list | The SubProblem List to iterate. |
Definition at line 159 of file b_and_b_data.c.
void delete_SubProblemList | ( | SubProblemsList * | list | ) |
Delete a SubProblem List.
list | The SubProblem List to delete. |
Definition at line 23 of file b_and_b_data.c.
void delete_SubProblemList_elem_index | ( | SubProblemsList * | list, |
size_t | index | ||
) |
Remove a SubProblem from a specific index of a SubProblem List.
list | The SubProblem List to modify. |
index | The index of the SubProblem to remove. |
Definition at line 113 of file b_and_b_data.c.
void delete_SubProblemList_iterator | ( | SubProblemsListIterator * | iterator | ) |
Delete a SubProblem List iterator.
iterator | The SubProblem List iterator. |
Definition at line 198 of file b_and_b_data.c.
SubProblem * get_current_openSubProblemList_iterator_element | ( | SubProblemsListIterator * | iterator | ) |
Definition at line 174 of file b_and_b_data.c.
SubProblem * get_SubProblemList_elem_index | ( | SubProblemsList * | list, |
size_t | index | ||
) |
Get a SubProblem from a specific index of a SubProblem List.
list | The SubProblem List to inspect. |
index | The index of the SubProblem to get. |
Definition at line 146 of file b_and_b_data.c.
size_t get_SubProblemList_size | ( | SubProblemsList * | list | ) |
Get the size of a SubProblem List.
list | The SubProblem List to inspect. |
Definition at line 54 of file b_and_b_data.c.
bool is_SubProblemList_empty | ( | SubProblemsList * | list | ) |
Check if a SubProblem List is empty.
list | The SubProblem List to check. |
Definition at line 39 of file b_and_b_data.c.
bool is_SubProblemList_iterator_valid | ( | SubProblemsListIterator * | iterator | ) |
Check if a SubProblem List iterator is valid.
An iterator is valid if it is not NULL and if the current element is not NULL.
iterator | The SubProblem List iterator to check. |
Definition at line 170 of file b_and_b_data.c.
void list_openSubProblemList_next | ( | SubProblemsListIterator * | iterator | ) |
Definition at line 178 of file b_and_b_data.c.
void new_SubProblemList | ( | SubProblemsList * | list | ) |
Create a new SubProblem List.
list | The SubProblem List to create. |
Definition at line 17 of file b_and_b_data.c.
SubProblem * SubProblemList_iterator_get_next | ( | SubProblemsListIterator * | iterator | ) |
Get the next element of a SubProblem List iterator.
iterator | The SubProblem List iterator. |
Definition at line 188 of file b_and_b_data.c.