Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cdc-counting
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Radek Hušek
cdc-counting
Commits
2438bf90
Commit
2438bf90
authored
4 years ago
by
Radek Hušek
Browse files
Options
Downloads
Patches
Plain Diff
Fix spelling
parent
f0b78612
No related branches found
No related tags found
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
experiments/test_exp_cdc.sh
+2
-2
2 additions, 2 deletions
experiments/test_exp_cdc.sh
graph_tools/misc.py
+4
-4
4 additions, 4 deletions
graph_tools/misc.py
graph_tools/parameters.py
+3
-3
3 additions, 3 deletions
graph_tools/parameters.py
graph_tools/tests.py
+1
-1
1 addition, 1 deletion
graph_tools/tests.py
with
10 additions
and
10 deletions
experiments/test_exp_cdc.sh
+
2
−
2
View file @
2438bf90
...
...
@@ -42,7 +42,7 @@ if True:
import json
from graph_tools.misc import graph_to_gadget
from graph_tools.parameters import CircuitDoubleCover, Underl
a
yingGraph
from graph_tools.parameters import CircuitDoubleCover, UnderlyingGraph
from sage.all import Graph
from parmap import parmap
...
...
@@ -51,7 +51,7 @@ if True:
gadget = graph_to_gadget(G)
real = gadget.eval(CircuitDoubleCover)
exp = 2**(G.num_verts() // 2) // 2
assert G.is_isomorphic(gadget.eval(Underl
a
yingGraph))
assert G.is_isomorphic(gadget.eval(UnderlyingGraph))
j = {
"graph": G.sparse6_string(),
...
...
This diff is collapsed.
Click to expand it.
graph_tools/misc.py
+
4
−
4
View file @
2438bf90
...
...
@@ -23,12 +23,12 @@ def _init_():
EXAMPLES:
>>>
from
sage.all
import
*
>>>
from
.parameters
import
CircuitDoubleCover
,
Underl
a
yingGraph
>>>
from
.parameters
import
CircuitDoubleCover
,
UnderlyingGraph
>>>
P
=
graphs
.
PetersenGraph
()
>>>
graph_to_gadget_naive
(
P
).
eval
(
CircuitDoubleCover
)
52
>>>
d
=
[
list
(
range
(
5
)),
list
(
range
(
5
,
10
))
]
>>>
P
.
is_isomorphic
(
graph_to_gadget_naive
(
P
,
d
).
eval
(
Underl
a
yingGraph
))
>>>
P
.
is_isomorphic
(
graph_to_gadget_naive
(
P
,
d
).
eval
(
UnderlyingGraph
))
True
>>>
graph_to_gadget_naive
(
P
,
d
).
eval
(
CircuitDoubleCover
)
52
...
...
@@ -94,12 +94,12 @@ def _init_():
EXAMPLES:
>>>
from
sage.all
import
*
>>>
from
.parameters
import
CircuitDoubleCover
,
Underl
a
yingGraph
>>>
from
.parameters
import
CircuitDoubleCover
,
UnderlyingGraph
>>>
P
=
graphs
.
PetersenGraph
()
>>>
graph_to_gadget
(
P
).
eval
(
CircuitDoubleCover
)
52
>>>
d
=
[
list
(
range
(
5
)),
list
(
range
(
5
,
10
))
]
>>>
P
.
is_isomorphic
(
graph_to_gadget
(
P
,
d
).
eval
(
Underl
a
yingGraph
))
>>>
P
.
is_isomorphic
(
graph_to_gadget
(
P
,
d
).
eval
(
UnderlyingGraph
))
True
>>>
graph_to_gadget
(
P
,
d
).
eval
(
CircuitDoubleCover
)
52
...
...
This diff is collapsed.
Click to expand it.
graph_tools/parameters.py
+
3
−
3
View file @
2438bf90
...
...
@@ -2,7 +2,7 @@ def _init_():
global
\
GroupFlow
,
\
EdgeColoring
,
VertexColoring
,
\
Underl
a
yingGraph
,
VertexCount
,
\
UnderlyingGraph
,
VertexCount
,
\
HamiltonianCycle
,
\
CycleDoubleCover
,
CircuitDoubleCover
...
...
@@ -102,7 +102,7 @@ def _init_():
@Singleton
class
Underl
a
yingGraph
(
GraphParameterBase
):
class
UnderlyingGraph
(
GraphParameterBase
):
from
sage.all
import
Graph
CUBIC_VERTEX
=
[
...
...
@@ -146,7 +146,7 @@ def _init_():
class
VertexCount
(
GraphParameterBase
):
"""
Count vertices of gadget.
Same as `gadget.eval(Underl
a
yingGraph).num_verts()` but
Same as `gadget.eval(UnderlyingGraph).num_verts()` but
also works for gadgets containing FREE_EDGE.
"""
CUBIC_VERTEX
=
[
BV
(
None
,
1
)
]
...
...
This diff is collapsed.
Click to expand it.
graph_tools/tests.py
+
1
−
1
View file @
2438bf90
...
...
@@ -3,7 +3,7 @@
>>>
from
.all
import
*
>>>
from
sage.all
import
*
>>>
g2g
=
lambda
gadget
:
gadget
.
eval
(
Underl
a
yingGraph
)
>>>
g2g
=
lambda
gadget
:
gadget
.
eval
(
UnderlyingGraph
)
>>>
assert
graphs
.
CompleteGraph
(
4
).
is_isomorphic
(
g2g
(
Necklace
.
graph
(
1
)))
>>>
assert
graphs
.
PetersenGraph
().
is_isomorphic
(
g2g
(
Petersen
))
>>>
assert
all
(
\
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment