Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

Commit

Permalink
fixes doc deprecation warnings (#861)
Browse files Browse the repository at this point in the history
* fixes doc deprecation warnings

* adding Base64 to runtests
  • Loading branch information
sbromberger authored and jpfairbanks committed Feb 27, 2018
1 parent 5710a54 commit 0340d5d
Show file tree
Hide file tree
Showing 22 changed files with 43 additions and 42 deletions.
2 changes: 1 addition & 1 deletion docs/make.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using Documenter
include("../src/LightGraphs.jl")
#include("../src/LightGraphs.jl")
using LightGraphs

# same for contributing and license
Expand Down
2 changes: 1 addition & 1 deletion src/SimpleGraphs/SimpleGraphs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ function rem_edge!(g::AbstractSimpleGraph{T}, u::Integer, v::Integer) where T
rem_edge!(g, edgetype(g)(T(u), T(v)))
end

@doc_str """
"""
rem_vertex!(g, v)
Remove the vertex `v` from graph `g`. Return false if removal fails
Expand Down
2 changes: 1 addition & 1 deletion src/biconnectivity/biconnect.jl
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ function visit!(g::AbstractGraph, state::Biconnections, u::Integer, v::Integer)
end
end

@doc_str """
"""
biconnected_components(g)
Compute the [biconnected components](https://en.wikipedia.org/wiki/Biconnected_component)
Expand Down
2 changes: 1 addition & 1 deletion src/centrality/betweenness.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# TODO - weighted, separate unweighted, edge betweenness


@doc_str """
"""
betweenness_centrality(g[, vs])
betweenness_centrality(g, k)
parallel_betweenness_centrality(g[, vs])
Expand Down
2 changes: 1 addition & 1 deletion src/centrality/closeness.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@doc_str """
"""
closeness_centrality(g)
Calculate the [closeness centrality](https://en.wikipedia.org/wiki/Centrality#Closeness_centrality)
Expand Down
2 changes: 1 addition & 1 deletion src/community/clustering.jl
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ function local_clustering!(storage::AbstractVector{Bool},
return ntriang, nalltriang
end

@doc_str """
"""
local_clustering(g, v)
local_clustering(g, vs)
Expand Down
2 changes: 1 addition & 1 deletion src/core.jl
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ Return the number of self loops in `g`.
"""
num_self_loops(g::AbstractGraph) = nv(g) == 0 ? 0 : sum(v -> has_edge(g, v, v), vertices(g))

@doc_str """
"""
density(g)
Return the density of `g`.
Density is defined as the ratio of the number of actual edges to the
Expand Down
14 changes: 7 additions & 7 deletions src/digraph/cycles/johnson.jl
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ The formula is coming from [Johnson, 1973](Johnson).
maxsimplecycles(n::Integer) = sum(x -> ncycles_n_i(n, x), 1:(n - 1))


@doc_str """
"""
maxsimplecycles(dg::::IsDirected, byscc::Bool = true)
Compute the theoretical maximum number of cycles in the directed graph `dg`.
Expand Down Expand Up @@ -102,7 +102,7 @@ function unblock!(v::T, blocked::BitArray, B::Vector{Set{T}}) where T<:Integer
end
end

@doc_str """
"""
circuit{T<:Integer}(v::T, dg::::IsDirected, vis::JohnsonVisitor{T},
allcycles::Vector{Vector{T}}, vmap::Vector{T}, startnode::T = v)
Expand Down Expand Up @@ -154,7 +154,7 @@ allcycles::Vector{Vector{T}}, vmap::Vector{T}, startnode::T = v) where T<:Intege
end


@doc_str """
"""
simplecycles(dg::::IsDirected)
Compute all cycles of the given directed graph, using
Expand Down Expand Up @@ -186,7 +186,7 @@ end

##########################################################
#### Iterative version, using Tasks, of the previous algorithms.
@doc_str """
"""
circuit_iter{T<:Integer}(v::T, dg::::IsDirected, vis::JohnsonVisitor{T},
vmap::Vector{T}, cycle::Channel, startnode::T = v)
Expand Down Expand Up @@ -267,7 +267,7 @@ function itercycles end
end
end

@doc_str """
"""
simplecyclescount(dg::DiGraph, ceiling = 10^6)
Count the number of cycles in a directed graph, using
Expand All @@ -292,7 +292,7 @@ function simplecyclescount end
return len
end

@doc_str """
"""
simplecycles_iter(dg::DiGraph, ceiling = 10^6)
Search all cycles of the given directed graph, using
Expand All @@ -314,7 +314,7 @@ function simplecycles_iter end
@traitfn simplecycles_iter(dg::::IsDirected, ceiling = 10^6) =
collect(Iterators.take(Channel(c -> itercycles(dg, c)), ceiling))

@doc_str """
"""
simplecycleslength(dg::DiGraph, ceiling = 10^6)
Search all cycles of the given directed graph, using
Expand Down
2 changes: 1 addition & 1 deletion src/digraph/transitivity.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@doc_str """
"""
transitiveclosure!(g, selflooped=false)
Compute the transitive closure of a directed graph, using the Floyd-Warshall
Expand Down
2 changes: 1 addition & 1 deletion src/edit_distance.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@doc_str """
"""
edit_distance(G₁::AbstractGraph, G₂::AbstractGraph)
Compute the edit distance between graphs `G₁` and `G₂`. Return the minimum
Expand Down
2 changes: 1 addition & 1 deletion src/generators/euclideangraphs.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@doc_str """
"""
euclidean_graph(N, d; seed=-1, L=1., p=2., cutoff=-1., bc=:open)
Generate `N` uniformly distributed points in the box ``[0,L]^{d}``
Expand Down
22 changes: 11 additions & 11 deletions src/generators/randgraphs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ function barabasi_albert!(g::AbstractGraph, n::Integer, k::Integer; seed::Int=-1
end


@doc_str """
"""
static_fitness_model(m, fitness)
Generate a random graph with ``|fitness|`` vertices and `m` edges,
Expand Down Expand Up @@ -393,7 +393,7 @@ function static_fitness_model(m::Integer, fitness::Vector{T}; seed::Int=-1) wher
return g
end

@doc_str """
"""
static_fitness_model(m, fitness_out, fitness_in)
Generate a random graph with ``|fitness\\_out + fitness\\_in|`` vertices and `m` edges,
Expand Down Expand Up @@ -449,7 +449,7 @@ function _create_static_fitness_graph!(g::AbstractGraph, m::Integer, cum_fitness
end
end

@doc_str """
"""
static_scale_free(n, m, α)
Generate a random graph with `n` vertices, `m` edges and expected power-law
Expand All @@ -475,7 +475,7 @@ function static_scale_free(n::Integer, m::Integer, α::Real; seed::Int=-1, finit
static_fitness_model(m, fitness, seed=seed)
end

@doc_str """
"""
static_scale_free(n, m, α_out, α_in)
Generate a random graph with `n` vertices, `m` edges and expected power-law
Expand Down Expand Up @@ -523,7 +523,7 @@ function _construct_fitness(n::Integer, α::Real, finite_size_correction::Bool)
return fitness
end

@doc_str """
"""
random_regular_graph(n, k)
Create a random undirected
Expand Down Expand Up @@ -565,7 +565,7 @@ function random_regular_graph(n::Integer, k::Integer; seed::Int=-1)
return g
end

@doc_str """
"""
random_configuration_model(n, ks)
Create a random undirected graph according to the [configuration model]
Expand Down Expand Up @@ -605,7 +605,7 @@ function random_configuration_model(n::Integer, k::Array{T}; seed::Int=-1, check
return g
end

@doc_str """
"""
random_regular_digraph(n, k)
Create a random directed [regular graph](https://en.wikipedia.org/wiki/Regular_graph)
Expand Down Expand Up @@ -649,7 +649,7 @@ function random_regular_digraph(n::Integer, k::Integer; dir::Symbol=:out, seed::
end
end

@doc_str """
"""
random_tournament_digraph(n)
Create a random directed [tournament graph]
Expand All @@ -671,7 +671,7 @@ function random_tournament_digraph(n::Integer; seed::Int=-1)
return g
end

@doc_str """
"""
stochastic_block_model(c, n)
Return a Graph generated according to the Stochastic Block Model (SBM).
Expand Down Expand Up @@ -722,7 +722,7 @@ function stochastic_block_model(c::Matrix{T}, n::Vector{U}; seed::Int = -1) wher
return g
end

@doc_str """
"""
stochastic_block_model(cint, cext, n)
Return a Graph generated according to the Stochastic Block Model (SBM), sampling
Expand Down Expand Up @@ -813,7 +813,7 @@ end
const biclique = ones(2, 2) - eye(2)

#TODO: this documentation needs work. sbromberger 20170326
@doc_str """
"""
nearbipartiteaffinity(sizes, between, intra)
Construct the affinity matrix for a near bipartite SBM.
Expand Down
2 changes: 1 addition & 1 deletion src/generators/smallgraphs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function _make_simple_directed_graph(n::T, edgelist::Vector{Tuple{T,T}}) where T
return g
end

doc"""
"""
smallgraph(s)
smallgraph(s)
Expand Down
4 changes: 2 additions & 2 deletions src/generators/staticgraphs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function CompleteGraph(n::Integer)
end


@doc_str """
"""
CompleteBipartiteGraph(n1, n2)
Create an undirected [complete bipartite graph](https://en.wikipedia.org/wiki/Complete_bipartite_graph)
Expand Down Expand Up @@ -169,7 +169,7 @@ function WheelDiGraph(n::Integer)
return g
end

@doc_str """
"""
Grid(dims; periodic=false)
Create a ``|dims|``-dimensional cubic lattice, with length `dims[i]`
Expand Down
4 changes: 2 additions & 2 deletions src/linalg/graphmatrices.jl
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ function CombinatorialAdjacency(A::SparseMatrix{T}) where T
end


@doc_str """
"""
NormalizedAdjacency{T}
The normalized adjacency matrix is ``\\hat{A} = D^{-1/2} A D^{-1/2}``.
Expand Down Expand Up @@ -133,7 +133,7 @@ struct CombinatorialLaplacian{T} <: Laplacian{T}
A::CombinatorialAdjacency{T}
end

@doc_str """
"""
NormalizedLaplacian{T}
The normalized Laplacian is ``\\hat{L} = I - D^{-1/2} A D^{-1/2}``.
Expand Down
4 changes: 2 additions & 2 deletions src/linalg/nonbacktracking.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

@doc_str """
"""
non_backtracking_matrix(g)
Return a non-backtracking matrix `B` and an edgemap storing the oriented
Expand Down Expand Up @@ -40,7 +40,7 @@ function non_backtracking_matrix(g::AbstractGraph)
return B, edgeidmap
end

@doc_str """
"""
Nonbacktracking{G}
A compact representation of the nonbacktracking operator.
Expand Down
6 changes: 3 additions & 3 deletions src/linalg/spectral.jl
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ function laplacian_matrix(g::AbstractGraph{U}, T::DataType=Int; dir::Symbol=:uns
return D - A
end

@doc_str """
"""
laplacian_spectrum(g[, T=Int; dir=:unspec])
Return the eigenvalues of the Laplacian matrix for a graph `g`, indexed
Expand All @@ -103,7 +103,7 @@ eigenvalues/eigenvectors.
"""
laplacian_spectrum(g::AbstractGraph, T::DataType=Int; dir::Symbol=:unspec) = eigvals(Matrix(laplacian_matrix(g, T; dir=dir)))

@doc_str """
"""
Return the eigenvalues of the adjacency matrix for a graph `g`, indexed
by vertex. Default values for `T` are the same as those in
[`adjacency_matrix`](@ref).
Expand Down Expand Up @@ -166,7 +166,7 @@ function incidence_matrix(g::AbstractGraph, T::DataType=Int; oriented=false)
return spmx
end

@doc_str """
"""
spectral_distance(G₁, G₂ [, k])
Compute the spectral distance between undirected n-vertex
Expand Down
2 changes: 1 addition & 1 deletion src/operators.jl
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ function reverse! end
return g
end

doc"""
"""
blkdiag(g, h)
Return a graph with ``|V(g)| + |V(h)|`` vertices and ``|E(g)| + |E(h)|``
Expand Down
2 changes: 1 addition & 1 deletion src/shortestpaths/dijkstra.jl
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ struct MultipleDijkstraState{T<:Real,U<:Integer} <: AbstractPathState
parents::Matrix{U}
end

@doc_str """
"""
parallel_multisource_dijkstra_shortest_paths(g, sources=vertices(g), distmx=weights(g))
Compute the shortest paths between all pairs of vertices in graph `g` by running
Expand Down
2 changes: 1 addition & 1 deletion src/shortestpaths/floyd-warshall.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ struct FloydWarshallState{T,U<:Integer} <: AbstractPathState
parents::Matrix{U}
end

@doc_str """
"""
floyd_warshall_shortest_paths(g, distmx=weights(g))
Use the [Floyd-Warshall algorithm](http://en.wikipedia.org/wiki/Floyd–Warshall_algorithm)
to compute the shortest paths between all pairs of vertices in graph `g` using an
Expand Down
2 changes: 1 addition & 1 deletion src/traversals/greedy_color.jl
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ If parallel is true then the colorings are executed in parallel.
random_greedy_color(g::AbstractGraph{T}, reps::Integer = 1, parallel::Bool = false) where {T<:Integer} =
parallel ? parallel_random_greedy_color(g, reps) : seq_random_greedy_color(g, reps)

@doc_str """
"""
greedy_color(g; sort_degree=false, parallel=false, reps = 1)
Color graph `g` based on [Greedy Coloring Heuristics](https://en.wikipedia.org/wiki/Greedy_coloring)
Expand Down
1 change: 1 addition & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ using Test
using SparseArrays
using LinearAlgebra
using DelimitedFiles
using Base64

const testdir = dirname(@__FILE__)

Expand Down

0 comments on commit 0340d5d

Please sign in to comment.