Glauber Dynamics in C
Simulation for Glauber Dynamics written in C11
Data Structures | Typedefs | Functions
edge.h File Reference

Define the edge struct and functions relating to it. More...

Go to the source code of this file.

Data Structures

struct  edge
 Edge struct to be used as edges in the graph structs. More...
 

Typedefs

typedef struct edge edge
 typedef of the edge struct.
 

Functions

edgeedge_new (int v1, int v2, int weight)
 Allocate a new edge with the corresponding entries for edge. More...
 
void edge_free (edge *e)
 Free the memory taken by the edge. More...
 

Detailed Description

Define the edge struct and functions relating to it.

Function Documentation

◆ edge_free()

void edge_free ( edge e)

Free the memory taken by the edge.

Parameters
eedge to be freed.

◆ edge_new()

edge * edge_new ( int  v1,
int  v2,
int  weight 
)

Allocate a new edge with the corresponding entries for edge.

Parameters
v1the integer that will be in edge->v1.
v2the integer that will be in edge->v2.
weightthe integer that will bein edge->weight.
Returns
The pointer to the new edge.