The sentinel code above every real refinement code: nauty's 077777.
Equations
Instances For
Search termination and nonlocal return control.
Instances For
The five node classifications.
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,
genTrace, and workperm.
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. The reusable workperm
array holds the scatter permutation prepared at a leaf. Return levels
and short-prune requests are carried by Exit.
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
- canong : κ
- samerows : Nat
- compCanon : Int
- eqlevFirst : Nat
- eqlevCanon : Int
- gcaFirst : Nat
- gcaCanon : Nat
- canonlevel : Nat
- noncheaplevel : Nat
- allsamelevel : Nat
- cosetindex : Nat
- stabvertex : Nat
- numnodes : Nat
- tctotal : Nat
- canupdates : Nat
- numorbits : Nat
- numgenerators : Nat
- numbadleaves : Nat
- maxlevel : Nat
- order : Nat
Exact stabilizer-index product, accumulated by policies that report it.
No nauty counterpart: every accepted automorphism kept in full, in discovery order, for the certificate producer, alongside the bounded
(fix, mcr)pairs ofautos.rundiscards it.Scratch permutation, allocated at initialization and filled by leaf comparisons.
Instances For
Dense nauty's specialization of the shared search state.
Equations
Instances For
Record an automorphism pair in the bounded workspace.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Record the refinement code on the first path.
Equations
- One or more equations did not get rendered due to their size.
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
Choose a target cell exactly when children can be required. Only a canonically smaller off-path node uses the first path's target hint.
Equations
- One or more equations did not get rendered due to their size.
Instances For
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
Scatter the current labelling through a reference labelling. Detach the scratch field while filling it so each element update consumes just the array, rather than reconstructing the search record.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Classify an off-path node, constructing its permutation in the scratch array and comparing canonical rows only after tied levels.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Record a permutation and its workspace pair, then join its orbits. The caller decides whether it counts as a new generator.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Install a better leaf, retaining its already compared row prefix.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Return past a bad or newly installed leaf. The all-same level limits the return, and the noncheap level can extend it.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Act on the five classifications. Code 2 without an orbit change still records its permutation and requests a short prune when needed.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Update the deepest noncheap level before descending.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Individualize a child vertex, recording every first-path coset index.
Equations
- One or more equations did not get rendered due to their size.
Instances For
After the leftmost child, record its greatest common ancestor and the vertex fixed by the generators subsequently reported there.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Decrement the all-same level only after a complete first-path sweep.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Reopen the partition below the receiving level, as in nauty’s recover.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Clamp the four level counters in nauty’s order. Equality in the last clamp resets the comparison with the canonical code.
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
Intersect with the most recently written workspace pair, as in nauty’s shortprune.
Equations
Instances For
Restore the partition and comparison levels after a child returns.
Equations
- Hex.GraphIso.Nauty.recover inf level st = Hex.GraphIso.Nauty.recoverLevels level (Hex.GraphIso.Nauty.recoverPtn inf level st)
Instances For
Recovery consists of the partition rescan followed by the level clamps.
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
Equations
- One or more equations did not get rendered due to their size.
Instances For
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
The adjacency rows of a coloured graph.
Equations
Instances For
The vertices of one colour, in increasing order.