-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce named graphs architecture (PR #404)
* Intermediate progress * Named Graphs: change tst file copyright date * Outsource unpickler to DIGRAPHS_LoadNamedGraph6Strings * I forgot to declare local variables also added a lowercase bugfix * Named Digraphs: Implement ListNamedDigraphs as search function * Named Graphs: lint * Named Graphs: choose better name for test database * Named Graphs: add standard test and change error message * Named Graphs: add placeholder databases * More standard tests and ListNamed bugfix * Create final database * Rename files and variables Graph6 -> DiSparse6 since this is @reiniscirpons' format for the sporadic graphs * Move all new functions to digraph.gi * Delete tst/standard/named.tst and move tests to digraph.tst * Remove some DeclareOperation lines (A string is a list so no need to declare anything new) * Named Digraphs: add flexibility level to ListNamedDigraphs * Named Graphs: add test * Named Digraphs: update error message and improve search speed * Named Digraphs: documentation * Apply suggestions from code review Co-authored-by: Wilf Wilson <wilf@wilf-wilson.net> * Named Digraphs: store records in uncompressed .g files Also for naming consistency, change all variables, functions and filenames to "named digraphs" and "named digraphs tests". * Named Digraphs: rename graph -> digraph in comments Co-authored-by: Murray Whyte <mw231@st-andrews.ac.uk> Co-authored-by: Tom Conti-Leslie <tom.contileslie@gmail.com> Co-authored-by: Wilf Wilson <wilf@wilf-wilson.net> Co-authored-by: Tom Conti-Leslie <54725378+tomcontileslie@users.noreply.github.com>
- Loading branch information
1 parent
85ab060
commit 3026304
Showing
8 changed files
with
5,012 additions
and
2 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
############################################################################# | ||
## | ||
#W extreme/named.tst | ||
#Y Copyright (C) 2021 Tom D. Conti-Leslie | ||
## | ||
## Licensing information can be found in the README file of this package. | ||
## | ||
############################################################################# | ||
## | ||
## This tests attributes of all digraphs stored in the named digraphs main | ||
## database against known values. Attributes tested are largely from House | ||
## of Graphs at hog.grinvin.org. | ||
## | ||
gap> START_TEST("Digraphs package: extreme/named.tst"); | ||
gap> LoadPackage("digraphs", false);; | ||
|
||
# | ||
gap> DIGRAPHS_StartTest(); | ||
|
||
# Load the record of stored test values | ||
gap> DIGRAPHS_LoadNamedDigraphsTests(); | ||
gap> r := DIGRAPHS_NamedDigraphsTests;; | ||
|
||
# For each graph, test Digraphs-generated properties against stored values. | ||
# "failed" is a list of pairs [name, prop] where the digraph called "name" | ||
# did not coincide with the test record on property "prop". The test is | ||
# passed if this list remains empty. If it contains digraphs, you should check | ||
# those digraphs for errors. | ||
gap> names := RecNames(r);; | ||
gap> failed := [];; | ||
gap> for name in names do | ||
> D := Digraph(name);; | ||
> properties := r.(name);; | ||
> for prop in RecNames(properties) do | ||
> if ValueGlobal(prop)(D) <> properties.(prop) then | ||
> Add(failed, [name, prop]);; | ||
> fi; | ||
> od; | ||
> od; | ||
gap> failed; | ||
[ ] | ||
|
||
# DIGRAPHS_UnbindVariables | ||
gap> Unbind(f); | ||
gap> Unbind(r); | ||
gap> Unbind(names); | ||
gap> Unbind(name); | ||
gap> Unbind(properties); | ||
gap> Unbind(failed); | ||
gap> Unbind(D); | ||
gap> Unbind(prop); | ||
|
||
# | ||
gap> DIGRAPHS_StopTest(); | ||
gap> STOP_TEST("Digraphs package: extreme/named.tst", 0); |
Oops, something went wrong.