// -*- C++ -*- // automatically generated by autodoc // ========== HEADER FILE src/graph/digraph-paths.h: ========== class digraph_paths; // Find all full paths in a directed graph. // ========== HEADER FILE src/graph/digraph.h: ========== class digraph; // Directed graph with ng nodes. // Initialization just allocates memory, // filling in the edges is left to the user. // ========== HEADER FILE src/graph/lyndon-gray.h: ========== class lyndon_gray; // Gray code for n-bit Lyndon words (for prime n), else (n odd composite) // Gray code for necklaces (except all-ones and all-zeros word). // Must have: n odd, n right rotations, otherwise left rotations. class lyngray_dat; // Data needed for Gray paths through Lyndon words. // ----- SRCFILE=src/graph/mk-lyndon-gray-digraph.cc: ----- void print_lyndon_gray_digraph(const digraph &dg, lyngray_dat *ldat); // Print Lyndon-Gray digraph. bool lyndon_gray_rot_delta(const ulong *rv, ulong ng, lyngray_dat *ldat); // Setup arrays with rotations (rr[]) and the delta sequence (dd[]). // Return whether all rotations are zero. void print_lyndon_gray_path(const digraph_paths &dp, lyngray_dat *ldat); // Detailed print of path through Lyndon-Gray digraph. digraph * make_lyndon_gray_digraph(ulong n, lyngray_dat *&ldat, ulong rot0q/*=0*/); // Initialization for Lyndon-Gray digraph: // n must be a prime <=BITS_PER_LONG. // ----- SRCFILE=src/graph/lyndon-cmp.cc: ----- int lyndon_cmp0(const ulong &a, const ulong &b); int lyndon_cmp1(const ulong &a, const ulong &b); int lyndon_cmp2(const ulong &a, const ulong &b); int lyndon_cmp3(const ulong &a, const ulong &b); int lyndon_cmp4(const ulong &a, const ulong &b); int lyndon_cmp5(const ulong &a, const ulong &b); int lyndon_cmp6(const ulong &a, const ulong &b); int lyndon_cmp7(const ulong &a, const ulong &b); // ========== HEADER FILE src/graph/print-path.h: ========== // ----- SRCFILE=src/graph/print-path.cc: ----- void print_path(const ulong *rv, ulong ng); // Print sequence of nodes. // Example: the first (De Bruijn) sequence for n=8 (ng=16) is // 0 1 2 4 9 3 6 13 10 5 11 7 15 14 12 8 void print_bin_path(const ulong *rv, ulong ng, ulong ngbits); // Print sequence of nodes both binary and decimal. // Example: the first (De Bruijn) sequence for n=8 (ng=16) is: // .... 0 // ...1 1 // ..1. 2 // .1.. 4 // 1..1 9 // ..11 3 // .11. 6 // 11.1 13 // 1.1. 10 // .1.1 5 // 1.11 11 // .111 7 // 1111 15 // 111. 14 // 11.. 12 // 1... 8 void print_bin_horiz_path(const ulong *rv, ulong ng, ulong ngbits, const char *c01/*=nullptr*/); // Horizontally print sequence of nodes in binary. // The first line corresponds to least significant bit. // Example: the first (De Bruijn) sequence for n=8 (ng=16) is: