Graph import and export for cljgrapht.core graphs.
Graph import and export for `cljgrapht.core` graphs.
(csv g)(csv g {:keys [format delimiter] :or {format :edge-list delimiter \,}})CSV string for g. :format is :edge-list, :adjacency-list, or
:matrix; :delimiter defaults to a comma.
CSV string for `g`. `:format` is `:edge-list`, `:adjacency-list`, or `:matrix`; `:delimiter` defaults to a comma.
(dimacs g)(dimacs g {:keys [format] :or {format :shortest-path}})DIMACS string for g. :format is :shortest-path, :max-clique, or
:coloring.
DIMACS string for `g`. `:format` is `:shortest-path`, `:max-clique`, or `:coloring`.
(dot g)(dot g {:keys [attributes]})DOT string for g. Vertex ids are sanitized pr-str values; labels keep the
original pr-str for display.
DOT string for `g`. Vertex ids are sanitized `pr-str` values; labels keep the original `pr-str` for display.
(gexf g)(gexf g {:keys [attributes]})GEXF string for g. Set :attributes to a vertex-to-attribute map.
GEXF string for `g`. Set `:attributes` to a vertex-to-attribute map.
(gml g)(gml g {:keys [attributes]})GML string for g. Set :attributes to a vertex-to-attribute map.
GML string for `g`. Set `:attributes` to a vertex-to-attribute map.
(graph6 g)(graph6 g {:keys [format] :or {format :graph6}})graph6 or sparse6 string for undirected g.
graph6 or sparse6 string for undirected `g`.
(graphml g)(graphml g {:keys [attributes]})GraphML string for g with sanitized pr-str vertex ids.
GraphML string for `g` with sanitized `pr-str` vertex ids.
(json-graph g)(json-graph g {:keys [attributes]})JGraphT JSON string for g. Set :attributes to a vertex-to-attribute map.
JGraphT JSON string for `g`. Set `:attributes` to a vertex-to-attribute map.
(lemon g)Lemon graph format string for g.
Lemon graph format string for `g`.
(matrix g)(matrix g {:keys [format] :or {format :adjacency-matrix}})Sparse matrix string for g. :format is :adjacency-matrix,
:laplacian, or :normalized-laplacian.
Sparse matrix string for `g`. `:format` is `:adjacency-matrix`, `:laplacian`, or `:normalized-laplacian`.
(read-csv path-or-string)(read-csv path-or-string
{:keys [format delimiter directed? weighted?]
:or {format :edge-list delimiter \,}})Read CSV from a string or existing path. Supports :format, :delimiter,
:directed?, and :weighted? options.
Read CSV from a string or existing path. Supports `:format`, `:delimiter`, `:directed?`, and `:weighted?` options.
(read-dimacs path-or-string)(read-dimacs path-or-string opts)Read DIMACS from a string or existing path. Graphs with a p sp header are
directed; :directed? and :weighted? can override detection.
Read DIMACS from a string or existing path. Graphs with a `p sp` header are directed; `:directed?` and `:weighted?` can override detection.
(read-dot path-or-string)Read a DOT string or existing path. Imported vertices are DOT id strings, not EDN parsed Clojure values.
Read a DOT string or existing path. Imported vertices are DOT id strings, not EDN parsed Clojure values.
(read-gexf path-or-string)Read GEXF from a string or existing path. Imported vertices are GEXF id strings, not EDN parsed Clojure values.
Read GEXF from a string or existing path. Imported vertices are GEXF id strings, not EDN parsed Clojure values.
(read-gml path-or-string)Read a GML string or existing path. Imported vertices are numeric GML ids.
Read a GML string or existing path. Imported vertices are numeric GML ids.
(read-graph6 path-or-string)(read-graph6 path-or-string _opts)Read graph6 or sparse6 from a string or existing path. Imported vertices are zero-based integer ids.
Read graph6 or sparse6 from a string or existing path. Imported vertices are zero-based integer ids.
(read-graphml path-or-string)Read a GraphML string or existing path. Imported vertices are GraphML id strings, not EDN parsed Clojure values.
Read a GraphML string or existing path. Imported vertices are GraphML id strings, not EDN parsed Clojure values.
(read-json path-or-string)(read-json path-or-string {:keys [directed?]})Read a JGraphT JSON string or existing path. Use :directed? true when the
source edge list represents a directed graph.
Read a JGraphT JSON string or existing path. Use `:directed? true` when the source edge list represents a directed graph.
(write-csv! g path)(write-csv! g path opts)Write (csv g opts) to path, returning nil.
Write `(csv g opts)` to `path`, returning nil.
(write-dimacs! g path)(write-dimacs! g path opts)Write (dimacs g opts) to path, returning nil.
Write `(dimacs g opts)` to `path`, returning nil.
(write-dot! g path)(write-dot! g path opts)Write (dot g) to path, returning nil.
Write `(dot g)` to `path`, returning nil.
(write-gexf! g path)(write-gexf! g path opts)Write (gexf g opts) to path, returning nil.
Write `(gexf g opts)` to `path`, returning nil.
(write-gml! g path)(write-gml! g path opts)Write (gml g opts) to path, returning nil.
Write `(gml g opts)` to `path`, returning nil.
(write-graph6! g path)(write-graph6! g path opts)Write (graph6 g opts) to path, returning nil.
Write `(graph6 g opts)` to `path`, returning nil.
(write-graphml! g path)(write-graphml! g path opts)Write (graphml g) to path, returning nil.
Write `(graphml g)` to `path`, returning nil.
(write-json! g path)(write-json! g path opts)Write (json-graph g opts) to path, returning nil.
Write `(json-graph g opts)` to `path`, returning nil.
(write-lemon! g path)Write (lemon g) to path, returning nil.
Write `(lemon g)` to `path`, returning nil.
(write-matrix! g path)(write-matrix! g path opts)Write (matrix g opts) to path, returning nil.
Write `(matrix g opts)` to `path`, returning nil.
(write-visio! g path)Write (visio g) to path, returning nil.
Write `(visio g)` to `path`, returning nil.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |