Skip to content

Commit af30aad

Browse files
committed
format again
1 parent 25dab6b commit af30aad

File tree

16 files changed

+553
-595
lines changed

16 files changed

+553
-595
lines changed

src/Experimental/Traversals/bfs.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import Base.Sort, Base.Sort.Algorithm
1+
using Base.Sort: Sort
2+
using Base.Sort.Algorithm: Algorithm
23
import Base: sort!
34

45
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)