You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/GraphProperties.jl
+99-72Lines changed: 99 additions & 72 deletions
Original file line number
Diff line number
Diff line change
@@ -4,8 +4,20 @@ export
4
4
GraphProperty,
5
5
PropertyComparison
6
6
7
+
"""
8
+
GraphProperty::Type
9
+
10
+
Abstract supertype for graph properties.
11
+
12
+
The only type parameter is the type of each value of the property.
13
+
"""
7
14
abstract type GraphProperty{T} end
8
15
16
+
"""
17
+
PropertyComparison(comparison, property, value)
18
+
19
+
Turn a `GraphProperty{<:Real}` into a `GraphProperty{Bool}` by attaching a comparison against a value.
20
+
"""
9
21
struct PropertyComparison{
10
22
Comparison <:Union{typeof(==), typeof(≤)},
11
23
Property <:GraphProperty{<:Real},
@@ -17,90 +29,105 @@ struct PropertyComparison{
17
29
end
18
30
19
31
let
20
-
properties_abstractvector = Symbol[
21
-
:DegreeSequence,
32
+
properties_abstractvector =Tuple{Symbol, String}[
33
+
(:DegreeSequence, "The *degree sequence* of an undirected graph."),
22
34
]
23
-
properties_real = Symbol[
24
-
:FractionalChromaticNumber,
25
-
:FractionalMatchingNumber,
35
+
properties_real = Tuple{Symbol, String}[
36
+
(:FractionalChromaticNumber, "The *fractional chromatic number* of an undirected graph."),
37
+
(:FractionalMatchingNumber, "The *fractional matching number* of an undirected graph."),
38
+
(:Strength, "The *strength* of an undirected graph."),
26
39
]
27
-
properties_integer = Symbol[
28
-
:NumberOfVertices,
29
-
:NumberOfEdges,
30
-
:NumberOfArcs,
31
-
:NumberOfConnectedComponents,
32
-
:MinimumDegree,
33
-
:MaximumDegree,
34
-
:Girth,
35
-
:VertexConnectivity,
36
-
:EdgeConnectivity,
37
-
:CliqueNumber,
38
-
:ChromaticNumber,
39
-
:ChromaticIndex,
40
-
:MatchingNumber,
41
-
:DominationNumber,
42
-
:IndependenceNumber,
43
-
:Choosability,
44
-
:FeedbackVertexSetNumber,
45
-
:VertexCoverNumber,
46
-
:EdgeCoverNumber,
47
-
:IntersectionNumber,
48
-
:BipartiteDimension,
49
-
:HadwigerNumber,
50
-
:TwinWidth,
51
-
:CliqueWidth,
52
-
:Treewidth,
53
-
:Pathwidth,
54
-
:Boxicity,
55
-
:Degeneracy,
56
-
:Arboricity,
57
-
:Splittance,
40
+
properties_integer = Tuple{Symbol, String}[
41
+
(:NumberOfVertices, "The *number of vertices* of a graph."),
42
+
(:NumberOfEdges, "The *number of edges* of an undirected graph."),
43
+
(:NumberOfArcs, "The *number of arcs* of a directed graph."),
44
+
(:NumberOfConnectedComponents, "The *number of connected components* of an undirected graph."),
45
+
(:MinimumDegree, "The *minimum degree* among the degrees of the vertices of an undirected graph."),
46
+
(:MaximumDegree, "The *maximum degree* among the degrees of the vertices of an undirected graph."),
47
+
(:Girth, "The *girth* of a undirected graph: the length of its shortest cycle."),
48
+
(:VertexConnectivity, "The *vertex-connectivity* of an undirected graph. Also known as the *connectivity*."),
49
+
(:EdgeConnectivity, "The *edge-connectivity* of an undirected graph."),
50
+
(:CliqueNumber, "The *clique number* of an undirected graph."),
51
+
(:ChromaticNumber, "The *chromatic number* of an undirected graph."),
52
+
(:ChromaticIndex, "The *chromatic index* of an undirected graph. Also known as the *edge chromatic number*."),
53
+
(:MatchingNumber, "The *matching number* of an undirected graph."),
54
+
(:DominationNumber, "The *domination number* of an undirected graph."),
55
+
(:StrongDominationNumber, "The *strong domination number* of an undirected graph."),
56
+
(:IndependenceNumber, "The *independence number* of an undirected graph."),
57
+
(:Choosability, "The *choosability* of an undirected graph. Also known as the *list colorability* or as the *list chromatic number*."),
58
+
(:FeedbackVertexSetNumber, "The *feedback vertex set number* of a graph."),
59
+
(:VertexCoverNumber, "The *vertex cover number* of an undirected graph."),
60
+
(:EdgeCoverNumber, "The *edge cover number* of an undirected graph."),
61
+
(:IntersectionNumber, "The *intersection number* of an undirected graph. Also known as the *R-content* or as the *edge clique cover number* or as the *clique cover number*."),
62
+
(:BipartiteDimension, "The *bipartite dimension* of an undirected graph. Also known as the *biclique cover number*."),
63
+
(:HadwigerNumber, "The *Hadwiger number* of an undirected graph. Also known as the *contraction clique number* or as the *homomorphism degree*."),
64
+
(:TwinWidth, "The *twin-width* of an undirected graph."),
65
+
(:CliqueWidth, "The *clique-width* of an undirected graph."),
66
+
(:Treewidth, "The *treewidth* of an undirected graph."),
67
+
(:Pathwidth, "The *pathwidth* of an undirected graph. Also known as the *interval thickness* or as the *vertex separation number* or as the *node searching number*."),
68
+
(:Boxicity, "The *boxicity* of an undirected graph."),
69
+
(:Sphericity, "The *sphericity* of an undirected graph."),
70
+
(:Degeneracy, "The *degeneracy* of an undirected graph. Also known as the *width* or as the *linkage*."),
71
+
(:Arboricity, "The *arboricity* of an undirected graph."),
72
+
(:Splittance, "The *splittance* of an undirected graph."),
58
73
]
59
-
properties_bool = Symbol[
60
-
:IsUndirectedGraph,
61
-
:IsDirectedGraph,
62
-
:DigraphIsDAG,
63
-
:DigraphIsOrientation,
64
-
:GraphIsConnected,
65
-
:DigraphIsWeaklyConnected,
66
-
:DigraphIsStronglyConnected,
67
-
:GraphIsBipartite,
68
-
:GraphIsPath,
69
-
:GraphIsCycle,
70
-
:GraphIsPlanar,
71
-
:DigraphIsPlanar,
72
-
:GraphIsTriangleFree,
73
-
:GraphIsComplete,
74
-
:GraphIsRegular,
75
-
:GraphIsPerfect,
76
-
:GraphIsTriviallyPerfect,
77
-
:GraphIsForest,
78
-
:GraphIsTree,
79
-
:GraphIsIndifferenceGraph,
80
-
:GraphIsIntervalGraph,
81
-
:GraphIsPtolemaic,
82
-
:GraphIsChordal,
83
-
:GraphIsMeynielGraph,
84
-
:GraphIsCircleGraph,
85
-
:GraphIsPermutationGraph,
86
-
:GraphIsCograph,
87
-
:GraphIsComparabilityGraph,
88
-
:GraphIsDistanceHereditary,
89
-
:GraphIsSplitGraph,
74
+
properties_bool =Tuple{Symbol, String}[
75
+
(:IsUndirectedGraph, "Is something an undirected graph?"),
76
+
(:IsDirectedGraph, "Is something a directed graph?"),
77
+
(:DigraphIsDAG, "Is a directed graph acyclic (a DAG)?"),
78
+
(:DigraphIsOrientation, "Is a directed graph an orientation?"),
79
+
(:GraphIsConnected, "Is an undirected graph connected?"),
80
+
(:DigraphIsWeaklyConnected, "Is a directed graph weakly connected?"),
81
+
(:DigraphIsStronglyConnected, "Is a directed graph strongly connected?"),
82
+
(:GraphIsBipartite, "Is an undirected graph bipartite?"),
83
+
(:GraphIsPath, "Is an undirected graph a path?"),
84
+
(:GraphIsCycle, "Is an undirected graph a cycle?"),
85
+
(:GraphIsPlanar, "Is an undirected graph planar?"),
86
+
(:DigraphIsPlanar, "Is a directed graph planar?"),
87
+
(:GraphIsTriangleFree, "Is an undirected graph triangle-free?"),
88
+
(:GraphIsComplete, "Is an undirected graph complete?"),
89
+
(:GraphIsRegular, "Is an undirected graph regular?"),
90
+
(:GraphIsPerfect, "Is an undirected graph perfect?"),
91
+
(:GraphIsTriviallyPerfect, "Is an undirected graph trivially perfect?"),
92
+
(:GraphIsForest, "Is an undirected graph a forest?"),
93
+
(:GraphIsTree, "Is an undirected graph a tree?"),
94
+
(:GraphIsIndifferenceGraph, "Is an undirected graph an indifference graph?"),
95
+
(:GraphIsIntervalGraph, "Is an undirected graph an interval graph?"),
96
+
(:GraphIsPtolemaic, "Is an undirected graph Ptolemaic?"),
97
+
(:GraphIsChordal, "Is an undirected graph chordal?"),
98
+
(:GraphIsMeynielGraph, "Is an undirected graph a Meyniel graph?"),
99
+
(:GraphIsCircleGraph, "Is an undirected graph a circle graph?"),
100
+
(:GraphIsPermutationGraph, "Is an undirected graph a permutation graph?"),
101
+
(:GraphIsCograph, "Is an undirected graph a cograph?"),
102
+
(:GraphIsComparabilityGraph, "Is an undirected graph a comparability graph?"),
103
+
(:GraphIsDistanceHereditary, "Is an undirected graph distance-hereditary?"),
104
+
(:GraphIsSplitGraph, "Is an undirected graph a split graph?"),
0 commit comments