33 lines
1.2 KiB
C
33 lines
1.2 KiB
C
#ifndef GRAPH_H
|
|
#define GRAPH_H
|
|
|
|
#include <stdint.h>
|
|
|
|
void random_adjacency(const uint64_t vertex_count,
|
|
uint64_t matrix[vertex_count][vertex_count]);
|
|
|
|
void calculate_distance_matrix(const uint64_t vertex_count,
|
|
const uint64_t adjacency_matrix[vertex_count][vertex_count],
|
|
uint64_t distance_matrix[vertex_count][vertex_count]);
|
|
|
|
// returns 1 if it is a disconnected graph and just in case it was on purpose,
|
|
// all values in eccentricities will be set to UINT64_MAX
|
|
int get_eccentricities(const uint64_t vertex_count,
|
|
const uint64_t distance_matrix[vertex_count][vertex_count],
|
|
uint64_t eccentricities[vertex_count]);
|
|
|
|
// returns the radius
|
|
uint64_t get_radius(const uint64_t vertex_count,
|
|
const uint64_t eccentricities[vertex_count]);
|
|
|
|
// returns the diameter
|
|
uint64_t get_diameter(const uint64_t vertex_count,
|
|
const uint64_t eccentricities[vertex_count]);
|
|
|
|
void get_centre(const uint64_t vertex_count,
|
|
const uint64_t eccentricities[vertex_count],
|
|
const uint64_t radius,
|
|
uint64_t centre[vertex_count]);
|
|
|
|
#endif
|