The sentinel code above every real refinement code: nauty's 077777.
Equations
Instances For
Search state: what nauty keeps in file-scope variables for the
duration of one nauty() call on n vertices. Every field is named
for the nauty global or statsblk member it mirrors, except wsCap
and genTrace.
lab and ptn are the partition nest: position i ends a cell at
level l exactly when ptn[i] ≤ l. active holds the positions of
the cells still to be used as splitters by refine. fixedpts holds
the vertices individualized on the path from the root to this node.
firstlab and canonlab are the labellings of the first leaf and of
the best-so-far leaf. firstcode and canoncode hold the refinement
code of their ancestor at each level, terminated by codeSentinel.
firsttc holds the target-cell position chosen at each level of the
first path, or -1 where there is none. canong holds the adjacency
rows of the best-so-far leaf, correct in its first samerows rows,
and canonlevel is that leaf's level.
eqlevFirst (eqlev_first) and eqlevCanon (eqlev_canon) are the
deepest levels to which this node's codes agree with the first leaf's
and with the best-so-far leaf's. compCanon (comp_canon) is -1,
0 or 1 as this node's code at level eqlevCanon + 1 is less than,
equal to, or greater than the best-so-far leaf's. gcaFirst
(gca_first) and gcaCanon (gca_canon) are the levels of the
greatest common ancestors of this node with those two leaves, and
cosetindex and stabvertex are the vertices individualized there.
orbits sends each vertex to the least vertex of its orbit under the
automorphisms found so far. noncheaplevel is one past the level of
the deepest ancestor for which cheapautom is false. allsamelevel
is the level of the least ancestor of the first leaf all of whose
descendant leaves are known to be equivalent. needshortprune records
that the parent's target cell is to be pruned by shortprune on
return.
numnodes, numorbits, numgenerators, numbadleaves, maxlevel,
tctotal and canupdates are the members of nauty's statsblk: the
nodes visited, the orbits, the generators reported, the leaves that
were neither an automorphism nor an improvement, the greatest depth
reached, the total size of the target cells chosen, and the number of
times the best-so-far leaf was replaced.
- active : VSet n
- fixedpts : VSet n
nauty's automorphism workspace: stored
(fix, mcr)pairs of discovered automorphisms, read byshortpruneandlongprune. OncewsCappairs are present the last slot is overwritten instead of a new one being added.wsCapis 500, the number of pairs that fit in the2 * 500 * msetwordsdensenautysupplies.- wsCap : Nat
- samerows : Nat
- compCanon : Int
- eqlevFirst : Nat
- eqlevCanon : Int
- gcaFirst : Nat
- gcaCanon : Nat
- canonlevel : Nat
- noncheaplevel : Nat
- allsamelevel : Nat
- cosetindex : Nat
- stabvertex : Nat
- needshortprune : Bool
- numnodes : Nat
- tctotal : Nat
- canupdates : Nat
- numorbits : Nat
- numgenerators : Nat
- numbadleaves : Nat
- maxlevel : Nat
Instances For
Equations
nauty's firstterminal: install the first leaf as both the first-path
data and the initial best-so-far leaf.
Equations
- One or more equations did not get rendered due to their size.
Instances For
nauty's processnode: classify a non-first-path node and act on it.
Returns the level to return to.
Equations
- One or more equations did not get rendered due to their size.
Instances For
nauty's longprune: intersect the target cell with the minimum-cell
representatives of every stored automorphism fixing all currently fixed
points.
Equations
- One or more equations did not get rendered due to their size.
Instances For
nauty's shortprune: intersect the target cell with the mcr set of
the most recently stored automorphism. The store is never empty when this
is called. An empty store leaves the cell unchanged.
Equations
Instances For
nauty's firstpathnode: produce a node on the leftmost path. Returns
the level to return to.
Equations
- One or more equations did not get rendered due to their size.
- Hex.GraphIso.Nauty.firstPathNode ctx inf tcLevel 0 level numcells st = (0, st)
Instances For
The child loop of firstpathnode: individualize each surviving
target-cell vertex in ascending order, tracking the orbit index count.
Returns some rtn for an early unwind.
Equations
- One or more equations did not get rendered due to their size.
- Hex.GraphIso.Nauty.firstChildLoop ctx inf tcLevel fuel 0 level numcells tc tv1 tv? tcell0 index0 st0 = (none, index0, st0)
- Hex.GraphIso.Nauty.firstChildLoop ctx inf tcLevel fuel cfuel level numcells tc tv1 none tcell0 index0 st0 = (none, index0, st0)
Instances For
The comparison bookkeeping of nauty's othernode between the
refinement and the target-cell choice: the first-path level-code
comparison and the best-so-far level-code comparison.
Equations
- One or more equations did not get rendered due to their size.
Instances For
nauty's othernode: produce a node off the leftmost path. Returns the
level to return to.
Equations
- One or more equations did not get rendered due to their size.
- Hex.GraphIso.Nauty.otherNode ctx inf tcLevel 0 level numcells st = (0, st)
Instances For
The child loop of othernode: individualize each surviving
target-cell vertex in ascending order, applying shortprune after any
child that asks for it and longprune after the first. Returns
some rtn for an early unwind.
Equations
Instances For
The result of a canonical search on n vertices: the canonical
labelling canonlab and the adjacency rows canong under it, together
with the statistics nauty reports in its statsblk. Those are the
nodes visited (numnodes), the orbits and generators of the
automorphism group (numorbits, numgenerators), the leaves that were
neither an automorphism nor an improvement (numbadleaves), the
greatest depth reached (maxlevel), the total size of the target cells
chosen (tctotal), and the number of times the best-so-far leaf was
replaced (canupdates).
- numnodes : Nat
- numorbits : Nat
- numgenerators : Nat
- numbadleaves : Nat
- maxlevel : Nat
- tctotal : Nat
- canupdates : Nat
Instances For
Equations
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
The initial ptn array: inf everywhere except 0 at each cell
end.
Equations
- Hex.GraphIso.Nauty.initPtn n inf cellEnds = List.foldl (fun (ptn : Array Nat) (e : Nat) => ptn.set! e 0) (Array.replicate n inf) cellEnds
Instances For
The initial active set: one bit per cell start.
Equations
- Hex.GraphIso.Nauty.initActive n cellEnds = (List.foldl (fun (p : Hex.GraphIso.Nauty.VSet n × Nat) (e : Nat) => (p.fst.insert p.snd, e + 1)) (Hex.GraphIso.Nauty.VSet.empty, 0) cellEnds).fst
Instances For
A traced run: the search result, every accepted automorphism in
discovery order, and the best path's refinement codes. This is the
trace the certificate producer reads. The search's canoncode array
and the certificate checker use the same code coordinates (each child
call is seeded with the parent's recomputed cell count), so the codes
are read off the final state directly.
- result : RunResult n
The best leaf's refinement codes at levels
1 .. canonlevel, without the sentinel.
Instances For
Run the pinned dense-nauty canonical search on n vertices with
adjacency rows g and the initial ordered partition (lab0, cellEnds),
returning the trace alongside the result. cellEnds lists, in order,
the last position of each colour cell.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The canonical search result: the traced run with its trace discarded.
Equations
- Hex.GraphIso.Nauty.run n g lab0 cellEnds = (Hex.GraphIso.Nauty.runTraced n g lab0 cellEnds).result
Instances For
The adjacency rows of a coloured graph.
Equations
Instances For
The vertices of one colour, in increasing order.
Equations
Instances For
Run the nauty-compatible search on a coloured graph, returning the trace for the certificate producer.
Equations
- Hex.GraphIso.Nauty.runColoredTraced G = match Hex.GraphIso.Nauty.initialPartition G with | (lab0, cellEnds) => Hex.GraphIso.Nauty.runTraced n (Hex.GraphIso.Nauty.rowsOf G) lab0 cellEnds
Instances For
Run the nauty-compatible search on a coloured graph.
Equations
Instances For
The nauty-compatible canonical result: the checked label from
canonlab and the relabelled coloured graph. none only if the raw
search output fails the label check, which conformance shows does not
occur.
Equations
- One or more equations did not get rendered due to their size.