OKlibrary  0.2.1.6
Connectedness.mac
Go to the documentation of this file.
00001 /* Oliver Kullmann, 27.11.2011 (Swansea) */
00002 /* Copyright 2011 Oliver Kullmann
00003 This file is part of the OKlibrary. OKlibrary is free software; you can redistribute
00004 it and/or modify it under the terms of the GNU General Public License as published by
00005 the Free Software Foundation and included in this library; either version 3 of the
00006 License, or any later version. */
00007 
00022 oklib_include("OKlib/ComputerAlgebra/Graphs/Lisp/Basic.mac")$
00023 
00024 /*
00025   For tests regarding connectedness see connected_g_p and sconnected_dg_p
00026   (plus variations) in ComputerAlgebra/Graphs/Lisp/Basic.mac.
00027 */
00028 
00029 /* Connected components of a graph: */
00030 concom_g(G) := block([mg : g2mg(G)], setify(map(setify,
00031  map(lambda([C], map(lambda([v], get_vertex_label(v,mg)), C)), 
00032      connected_components(mg)))))$
00033