Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@
[![Coverage](https://codecov.io/gh/JuliaGraphs/GraphProperties.jl/branch/main/graph/badge.svg)](https://codecov.io/gh/JuliaGraphs/GraphProperties.jl)
[![PkgEval](https://JuliaCI.github.io/NanosoldierReports/pkgeval_badges/G/GraphProperties.svg)](https://JuliaCI.github.io/NanosoldierReports/pkgeval_badges/G/GraphProperties.html)
[![Aqua](https://raw.githubusercontent.com/JuliaTesting/Aqua.jl/master/badge.svg)](https://github.com/JuliaTesting/Aqua.jl)

Julia package for describing graph properties.
103 changes: 102 additions & 1 deletion src/GraphProperties.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,106 @@
module GraphProperties

# Write your package code here.
export
GraphProperty,
PropertyComparison

abstract type GraphProperty{T} end

struct PropertyComparison{
Comparison <: Union{typeof(==), typeof(≤), typeof(≥)},
Property <: GraphProperty{<:Real},
Value,
} <: GraphProperty{Bool}
comparison::Comparison
property::Property
value::Value
end

let
properties_abstractvector = Symbol[
:DegreeSequence,
]
properties_real = Symbol[
:FractionalChromaticNumber,
:FractionalMatchingNumber,
]
properties_integer = Symbol[
:NumberOfVertices,
:NumberOfEdges,
:NumberOfArcs,
:NumberOfConnectedComponents,
:MinimumDegree,
:MaximumDegree,
:Girth,
:VertexConnectivity,
:EdgeConnectivity,
:CliqueNumber,
:ChromaticNumber,
:ChromaticIndex,
:MatchingNumber,
:DominationNumber,
:IndependenceNumber,
:Choosability,
:FeedbackVertexSetNumber,
:VertexCoverNumber,
:EdgeCoverNumber,
:IntersectionNumber,
:BipartiteDimension,
:HadwigerNumber,
:TwinWidth,
:CliqueWidth,
:Treewidth,
:Pathwidth,
:Boxicity,
:Degeneracy,
:Arboricity,
:Splittance,
]
properties_bool = Symbol[
:IsUndirectedGraph,
:IsDirectedGraph,
:DigraphIsDAG,
:DigraphIsOrientation,
:GraphIsConnected,
:DigraphIsWeaklyConnected,
:DigraphIsStronglyConnected,
:GraphIsBipartite,
:GraphIsPath,
:GraphIsCycle,
:GraphIsPlanar,
:DigraphIsPlanar,
:GraphIsTriangleFree,
:GraphIsComplete,
:GraphIsRegular,
:GraphIsPerfect,
:GraphIsTriviallyPerfect,
:GraphIsForest,
:GraphIsTree,
:GraphIsIndifferenceGraph,
:GraphIsIntervalGraph,
:GraphIsPtolemaic,
:GraphIsChordal,
:GraphIsMeynielGraph,
:GraphIsCircleGraph,
:GraphIsPermutationGraph,
:GraphIsCograph,
:GraphIsComparabilityGraph,
:GraphIsDistanceHereditary,
:GraphIsSplitGraph,
]
for (typ, properties) ∈ (
(AbstractVector, properties_abstractvector),
(Real, properties_real),
(Integer, properties_integer),
(Bool, properties_bool),
)
for p ∈ properties
@eval export $p
@eval struct $p <: GraphProperty{$typ} end
end
end
end

# TODO: doc strings

end