Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
ca-dot.H File Reference

GraphViz DOT renderer for graph cellular automata. More...

#include <concepts>
#include <filesystem>
#include <fstream>
#include <ostream>
#include <sstream>
#include <string>
#include <utility>
#include <ah-errors.H>
#include <ca-frame-stream.H>
#include <tpl_ca_graph_automaton.H>
Include dependency graph for ca-dot.H:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  Aleph::CA::DOT_Render_Options
 DOT rendering options. More...
 
struct  Aleph::CA::Binary_DOT_Palette< State >
 Default binary DOT fill-colour palette. More...
 
class  Aleph::CA::Dot_Frame_Sink< Palette >
 Path-pattern sink that writes GraphViz DOT frames. More...
 

Namespaces

namespace  Aleph
 Main namespace for Aleph-w library functions.
 
namespace  Aleph::CA
 
namespace  Aleph::CA::ca_dot_detail
 

Functions

std::string Aleph::CA::ca_dot_detail::quote (const std::string &s)
 
std::string Aleph::CA::ca_dot_detail::quote_id_if_needed (const std::string &s)
 Return s as a bare DOT identifier when it matches [A-Za-z_][A-Za-z_0-9]*, otherwise return quote(s).
 
template<typename Graph , typename Palette >
requires requires(const Graph &g, std::size_t n, Palette &&p, const typename Graph::state_type &v) { g.size(); g.neighbours(n); g.at_node(n); { p(v) } -> std::convertible_to<std::string>; }
void Aleph::CA::render_graph_lattice_dot (std::ostream &out, const Graph &graph, Palette &&palette, const DOT_Render_Options &opts={})
 Render a graph CA frame as GraphViz DOT.
 
template<typename Graph , typename Palette >
std::string Aleph::CA::render_graph_lattice_dot_string (const Graph &graph, Palette &&palette, const DOT_Render_Options &opts={})
 Return a graph frame rendered as DOT.
 
template<typename Palette >
 Aleph::CA::Dot_Frame_Sink (std::filesystem::path, Palette, DOT_Render_Options={}, std::size_t=6) -> Dot_Frame_Sink< Palette >
 

Detailed Description

GraphViz DOT renderer for graph cellular automata.

Graph_Lattice frames are rendered as undirected DOT graphs by default, with one filled node per cell and edges from the precomputed adjacency list.

Author
Leandro Rabindranath Leon

Definition in file ca-dot.H.