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
39f10629
Commit
39f10629
authored
5 years ago
by
Radek Hušek
Browse files
Options
Downloads
Patches
Plain Diff
a few tests
parent
a91caf43
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
graph_tools/parameters.py
+5
-0
5 additions, 0 deletions
graph_tools/parameters.py
graph_tools/tests.py
+3
-4
3 additions, 4 deletions
graph_tools/tests.py
with
8 additions
and
4 deletions
graph_tools/parameters.py
+
5
−
0
View file @
39f10629
...
@@ -132,6 +132,11 @@ def _init_():
...
@@ -132,6 +132,11 @@ def _init_():
@Singleton
@Singleton
class
VertexCount
(
GraphParameterBase
):
class
VertexCount
(
GraphParameterBase
):
"""
Count vertices of gadget.
Same as `gadget.eval(UnderlayingGraph).num_verts()` but
also works for gadgets containing FREE_EDGE.
"""
CUBIC_VERTEX
=
[
Boundary
(
None
,
1
)
]
CUBIC_VERTEX
=
[
Boundary
(
None
,
1
)
]
FREE_EDGE
=
[
Boundary
(
None
,
0
)
]
FREE_EDGE
=
[
Boundary
(
None
,
0
)
]
...
...
This diff is collapsed.
Click to expand it.
graph_tools/tests.py
+
3
−
4
View file @
39f10629
"""
Helper to run tests.
"""
Helper to run tests.
Doctest does not find tests in docstrings of decorated classes
so we put them here instead.
>>>
from
.all
import
*
>>>
from
.all
import
*
>>>
from
sage.all
import
*
>>>
from
sage.all
import
*
...
@@ -38,5 +34,8 @@ True
...
@@ -38,5 +34,8 @@ True
240
240
>>>
[
GeneralizedPetersen
(
1
).
graph
(
i
).
eval
(
CircuitDoubleCover
)
for
i
in
range
(
3
,
16
)
]
[
4
,
26
,
72
,
258
,
842
,
3118
,
11620
,
45290
,
177630
,
705510
,
2807768
,
11210722
,
44785618
]
"""
"""
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