Skip to content

Commit 24f1e73

Browse files
committed
update to Formatter v2
1 parent 9a7a6df commit 24f1e73

File tree

16 files changed

+547
-594
lines changed

16 files changed

+547
-594
lines changed

Project.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ GraphsSharedArraysExt = "SharedArrays"
2121

2222
[compat]
2323
ArnoldiMethod = "0.4"
24-
Distributed = "1"
2524
DataStructures = "0.18, 0.19"
25+
Distributed = "1"
2626
Inflate = "0.1.3"
2727
LinearAlgebra = "1"
2828
Random = "1"
29-
SharedArrays = "1"
29+
SharedArrays = "1"
3030
SimpleTraits = "0.9.1"
3131
SparseArrays = "1"
3232
Statistics = "1"

src/Experimental/Traversals/bfs.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import Base.Sort, Base.Sort.Algorithm
21
import Base: sort!
32

43
struct NOOPSortAlg <: Base.Sort.Algorithm end

src/Experimental/vf2.jl

Lines changed: 3 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,7 @@ function has_induced_subgraphisomorph(
489489
edge_relation::Union{Nothing,Function}=nothing,
490490
)::Bool
491491
result = false
492-
callback(vmap) = (result = true; return false)
492+
callback(vmap) = (result=true; return false)
493493
vf2(
494494
callback,
495495
g1,
@@ -509,7 +509,7 @@ function has_subgraphisomorph(
509509
edge_relation::Union{Nothing,Function}=nothing,
510510
)::Bool
511511
result = false
512-
callback(vmap) = (result = true; return false)
512+
callback(vmap) = (result=true; return false)
513513
vf2(
514514
callback,
515515
g1,
@@ -531,7 +531,7 @@ function has_isomorph(
531531
!could_have_isomorph(g1, g2) && return false
532532

533533
result = false
534-
callback(vmap) = (result = true; return false)
534+
callback(vmap) = (result=true; return false)
535535
vf2(
536536
callback,
537537
g1,
@@ -646,32 +646,3 @@ function all_subgraphisomorph(
646646
end
647647
return ch
648648
end
649-
650-
#! format: off
651-
# Turns off formatting from this point onwards
652-
653-
function all_isomorph(
654-
g1::AbstractGraph,
655-
g2::AbstractGraph,
656-
alg::VF2;
657-
vertex_relation::Union{Nothing,Function}=nothing,
658-
edge_relation::Union{Nothing,Function}=nothing,
659-
)::Channel{Vector{Tuple{eltype(g1),eltype(g2)}}}
660-
T = Vector{Tuple{eltype(g1),eltype(g2)}}
661-
!could_have_isomorph(g1, g2) && return Channel(_ -> nothing, ctype = T)
662-
make_callback(c) = vmap -> (put!(c, collect(zip(vmap, 1:length(vmap)))), return true)
663-
ch::Channel{T} = Channel(; ctype=T) do c
664-
vf2(
665-
make_callback(c),
666-
g1,
667-
g2,
668-
IsomorphismProblem();
669-
vertex_relation=vertex_relation,
670-
edge_relation=edge_relation,
671-
)
672-
end
673-
return ch
674-
end
675-
676-
#! format: on
677-
# Turns on formatting from this point onwards

src/SimpleGraphs/generators/randgraphs.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1164,7 +1164,7 @@ function stochastic_block_model(
11641164
for b in a:K
11651165
((a == b) && !(c[a, b] <= n[b] - 1)) ||
11661166
((a != b) && !(c[a, b] <= n[b])) && error(
1167-
"Mean degree cannot be greater than available neighbors in the block.",
1167+
"Mean degree cannot be greater than available neighbors in the block."
11681168
) # TODO 0.7: turn into some other error?
11691169

11701170
m = a == b ? div(n[a] * (n[a] - 1), 2) : n[a] * n[b]

0 commit comments

Comments
 (0)