Graph Convolutional Branch and Bound v1.0.0
A TSP solver that combines a graph convolutional network with a 1-Tree branch-and-bound.
Loading...
Searching...
No Matches
Functions
graph.c File Reference

The implementation of the graph data structure. More...

#include "graph.h"
#include "doubly_linked_list/list_iterator.h"

Go to the source code of this file.

Functions

void create_graph (Graph *graph, List *nodes_list, List *edges_list, GraphKind kind)
 Create a new instance of a Graph with all the needed parameters.
 
void create_euclidean_graph (Graph *graph, List *nodes)
 Create a new instance of an euclidean graphs only the Nodes are necessary.
 
void print_graph (const Graph *G)
 Print Nodes, Edges and other information of the Graph.
 

Detailed Description

The implementation of the graph data structure.

Author
Lorenzo Sciandra
Version
1.0.0 @data 2024-05-1

Repo: https://github.com/LorenzoSciandra/GraphConvolutionalBranchandBound

Definition in file graph.c.

Function Documentation

◆ create_euclidean_graph()

void create_euclidean_graph ( Graph graph,
List nodes 
)

Create a new instance of an euclidean graphs only the Nodes are necessary.

Parameters
nodesPointer to the List of Nodes.
graphPointer to the Graph to be initialized.

Definition at line 71 of file graph.c.

◆ create_graph()

void create_graph ( Graph graph,
List nodes,
List edges,
GraphKind  kind 
)

Create a new instance of a Graph with all the needed parameters.

Parameters
nodesPointer to the List of Nodes.
edgesPointer to the List of Edges.
kindType of the Graph.
graphPointer to the Graph to be initialized.

Definition at line 18 of file graph.c.

◆ print_graph()

void print_graph ( const Graph graph)

Print Nodes, Edges and other information of the Graph.

Parameters
graphPointer to the Graph to be printed.

Definition at line 101 of file graph.c.