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
Classes | Typedefs | Enumerations | Functions
graph.h File Reference

The data structures to model the Graph. More...

#include "./doubly_linked_list//linked_list.h"
#include "./doubly_linked_list/list_iterator.h"
#include "./doubly_linked_list/list_functions.h"
#include "../problem_settings.h"

Go to the source code of this file.

Classes

struct  Node
 Structure of a Node. More...
 
struct  Edge
 Structure of an Edge. More...
 
struct  Graph
 Structure of a Graph. More...
 

Typedefs

typedef enum GraphKind GraphKind
 Enum to specify the kind of the Graph.
 
typedef struct Node Node
 Structure of a Node.
 
typedef struct Edge Edge
 Structure of an Edge.
 
typedef struct Graph Graph
 Structure of a Graph.
 

Enumerations

enum  GraphKind { WEIGHTED_GRAPH , UNWEIGHTED_GRAPH }
 Enum to specify the kind of the Graph. More...
 

Functions

void create_graph (Graph *graph, List *nodes, List *edges, 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 *graph)
 Print Nodes, Edges and other information of the Graph.
 

Detailed Description

The data structures to model the Graph.

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

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

Definition in file graph.h.

Typedef Documentation

◆ Edge

typedef struct Edge Edge

Structure of an Edge.

◆ Graph

typedef struct Graph Graph

Structure of a Graph.

◆ GraphKind

typedef enum GraphKind GraphKind

Enum to specify the kind of the Graph.

◆ Node

typedef struct Node Node

Structure of a Node.

Enumeration Type Documentation

◆ GraphKind

enum GraphKind

Enum to specify the kind of the Graph.

Enumerator
WEIGHTED_GRAPH 

The Graph is weighted.

UNWEIGHTED_GRAPH 

The Graph is unweighted.

Definition at line 23 of file graph.h.

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.