sgtl.graph#

Provides the Graph object, which is our core representation of a graph within the SGTL library.

Functions

complete_graph(number_of_vertices)

Construct the complete unweighted graph on \(n\) vertices.

cycle_graph(number_of_vertices)

Construct the unweighted cycle graph on \(n\) vertices.

from_edgelist(filename[, directed, num_vertices])

Construct an sgtl.Graph object from an edgelist file.

knn_graph(data, k)

Construct the k-nearest neighbours graph from the given data.

path_graph(number_of_vertices)

Construct the unweighted path graph on \(n\) vertices.

rbf_graph(data[, variance, threshold])

Construct a graph from the given data using a radial basis function.

star_graph(number_of_vertices)

Construct the unweighted star graph on \(n\) vertices.

to_edgelist(graph, filename)

Save the given graph object as an edgelist file.

Classes

Graph(adj_mat)

Represents a graph.