Skip to content

Commit 10c4d37

Browse files
committed
Fresh QN design
1 parent 94d171b commit 10c4d37

File tree

11 files changed

+325
-416
lines changed

11 files changed

+325
-416
lines changed

Project.toml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
name = "GraphDynamicalSystems"
22
uuid = "13529e2e-ed53-56b1-bd6f-420b01fca819"
33
authors = ["Reuben Gardos Reid <[email protected]>"]
4-
version = "0.0.2"
4+
version = "0.0.3"
55

66
[deps]
77
AbstractTrees = "1520ce14-60c1-5f80-bbc7-55ef81b5835c"
88
DocStringExtensions = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae"
99
DynamicalSystemsBase = "6e36e845-645a-534a-86f2-f5d4aa5a06b4"
10-
FileIO = "5789e2e9-d7fb-5bc7-8068-2c6fae9b9549"
1110
Graphs = "86223c79-3864-5bf0-83f7-82e725a168b6"
1211
HerbConstraints = "1fa96474-3206-4513-b4fa-23913f296dfc"
1312
HerbCore = "2b23ba43-8213-43cb-b5ea-38c12b45bd45"
@@ -17,15 +16,12 @@ MLStyle = "d8e11817-5142-5d16-987a-aa16d5891078"
1716
MetaGraphsNext = "fa8bd995-216d-47f1-8a91-f3b68fbeb377"
1817
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
1918
SciMLBase = "0bca4576-84f4-4d90-8ffe-ffa030f20462"
20-
SoleLogics = "b002da8f-3cb3-4d91-bbe3-2953433912b5"
2119
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
22-
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
2320

2421
[compat]
2522
AbstractTrees = "0.4.5"
2623
DocStringExtensions = "0.9.3"
2724
DynamicalSystemsBase = "3.13.2"
28-
FileIO = "1"
2925
Graphs = "1.12"
3026
HerbConstraints = "0.4"
3127
HerbCore = "0.3.4"
@@ -35,7 +31,5 @@ MLStyle = "0.4.17"
3531
MetaGraphsNext = "0.7"
3632
Random = "1.10"
3733
SciMLBase = "2.74.1"
38-
SoleLogics = "0.13"
3934
StaticArrays = "1.9.12"
40-
Statistics = "1.10"
41-
julia = "1.6"
35+
julia = "1.10"

src/GraphDynamicalSystems.jl

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,19 @@ module GraphDynamicalSystems
22

33
using DocStringExtensions
44

5-
6-
include("boolean_networks.jl")
7-
export BooleanNetworks
5+
include("gds_interface.jl")
6+
export ScheduleStyle, Asynchronous, Synchronous, get_schedule, get_state, get_graph
87

98
include("qualitative_networks.jl")
109
export QualitativeNetwork,
1110
QN,
1211
build_qn_grammar,
13-
update_functions_to_network,
12+
update_functions_to_interaction_graph,
1413
sample_qualitative_network,
15-
max_level,
16-
components,
14+
entities,
15+
get_domain,
1716
target_functions,
1817
interpret,
19-
aqn
18+
create_qn_system
2019

2120
end

src/boolean_networks.jl

Lines changed: 0 additions & 150 deletions
This file was deleted.

src/gds_interface.jl

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
import DynamicalSystemsBase.get_state
2+
using MetaGraphsNext: labels
3+
4+
abstract type ScheduleStyle end
5+
struct Asynchronous <: ScheduleStyle end
6+
struct Synchronous <: ScheduleStyle end
7+
8+
abstract type GraphDynamicalSystem{N,S} end
9+
const GDS = GraphDynamicalSystem
10+
11+
"""
12+
$(TYPEDSIGNATURES)
13+
14+
Get the number of entities `N` in the GDS.
15+
"""
16+
function get_n_entities(::GDS{N,S}) where {N,S}
17+
return N
18+
end
19+
20+
"""
21+
$(TYPEDSIGNATURES)
22+
23+
Get the schedule for the GDS.
24+
"""
25+
function get_schedule(::GDS{N,S}) where {N,S}
26+
return S
27+
end
28+
29+
"""
30+
$(TYPEDSIGNATURES)
31+
32+
Get the underlying graph of the GDS.
33+
"""
34+
function get_graph(gds::GDS)
35+
return gds.graph
36+
end
37+
38+
"""
39+
$(TYPEDSIGNATURES)
40+
41+
List all entities in `gds`.
42+
"""
43+
function entities(gds::GDS)
44+
return collect(labels(get_graph(gds)))
45+
end
46+
47+
"""
48+
$(TYPEDSIGNATURES)
49+
50+
Get the state of the GDS.
51+
"""
52+
function get_state(gds::GDS)
53+
return gds.state
54+
end

0 commit comments

Comments
 (0)