14#ifndef BRANCHANDBOUND_1TREE_GRAPH_H
15#define BRANCHANDBOUND_1TREE_GRAPH_H
19#include "../problem_settings.h"
void create_graph(Graph *graph, List *nodes, List *edges, GraphKind kind)
Create a new instance of a Graph with all the needed parameters.
void print_graph(const Graph *graph)
Print Nodes, Edges and other information of the Graph.
GraphKind
Enum to specify the kind of the Graph.
@ WEIGHTED_GRAPH
The Graph is weighted.
@ UNWEIGHTED_GRAPH
The Graph is unweighted.
void create_euclidean_graph(Graph *graph, List *nodes)
Create a new instance of an euclidean graphs only the Nodes are necessary.
The declaration of the functions to manipulate the List.
The declaration of the functions to manipulate the ListIterator.
#define MAX_EDGES_NUM
The maximum number of edges in the Graph.
unsigned short dest
ID of the destination vertex.
unsigned short src
ID of the source vertex.
double prob
Probability of the Edge to be in an optimal tour.
double weight
Weight of the Edge, 1 if the data_structures is not weighted.
unsigned short symbol
Symbol of the Edge, i.e. its unique ID.
unsigned short positionInGraph
Position of the Edge in the list of Edges of the Graph.
Edge edges_matrix[MAX_VERTEX_NUM][MAX_VERTEX_NUM]
Adjacency matrix of the Graph.
unsigned short num_edges
Number of Edges in the Graph.
bool orderedEdges
True if the Edges are ordered by weight, false otherwise.
Edge edges[MAX_EDGES_NUM]
Array of Edges.
GraphKind kind
Type of the Graph.
Node nodes[MAX_VERTEX_NUM]
Array of Nodes.
double cost
Sum of the weights of the Edges in the Graph.
unsigned short num_nodes
Number of Nodes in the Graph.
double x
x coordinate of the Node.
double y
y coordinate of the Node.
unsigned short num_neighbours
Number of neighbours of the Node.
unsigned short positionInGraph
Position of the Node in the list of Nodes of the Graph, i.e. its unique ID.
unsigned short neighbours[MAX_VERTEX_NUM - 1]
Array of IDs of the Node's neighbors.