Graphs
Reference
Index
Content
SpectralClustering.Graph
— Type.Graph(n_vertices::Integer=0; vertex_type::DataType = Any ,initial_value=nothing, weight_type::DataType = Float64)
Construct an undirected weighted grpah of n_vertices
vertices.
SpectralClustering.connect!
— Method.function connect!(g::Graph, i::Integer, neighbors::Vector, weigths::Vector)
SpectralClustering.connect!
— Method.connect!(g::Graph,i::Integer,j::Integer,w::Number)
Connect the vertex i
with the vertex j
with weight w
.
SpectralClustering.disconnect
— Method.disconnect(g::Graph,i::Integer,j::Integer)
Removes the edge that connects the i
-th vertex to the j
-th vertex.
SpectralClustering.random_graph
— Method.function random_graph(iterations::Integer; probs=[0.4,0.4,0.2], weight=()->5, debug=false)
Create a random graphs. probs
is an array of probabilities. The function create a vertex with probability probs[1]
, connect two vertices with probability probs[2]
and delete a vertex with probability probs[2]
. The weight of the edges is given by weight
SpectralClustering.remove_vertex!
— Method.remove_vertex!(g::Graph,i::Integer)
Remove the i
-th vertex.
SpectralClustering.target_vertex
— Method.target_vertex(e::Edge,v::Vertex)
Given an edge e
and a vertex v
returns the other vertex different from v
SpectralClustering.Edge
— Type.type Edge
Base.length
— Method.length(v::Vertex)
Return the number of edges connected to a given vertex.
LightGraphs.nv
— Method.nv(g::Graph)
Return the number of vertices of g
.