Skip to content
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 9 additions & 18 deletions build/pkgs/tdlib/SPKG.rst
Original file line number Diff line number Diff line change
@@ -1,32 +1,23 @@
tdlib: Algorithms for computing tree decompositions
===================================================
tdlib: Algorithms for computing tree decompositions of graphs
=============================================================

Description
-----------

Providing algorithms concerning treedecompositions
This library, now known as treedec,
provides algorithms concerning tree decompositions.

website: https://github.com/freetdi/tdlib

License
-------

GNU General Public License v2


SPKG Maintainers
----------------

Lukas Larisch ([email protected])
- GNU General Public License v2
- GNU General Public License v3


Upstream Contact
----------------

- Lukas Larisch ([email protected])
- git-repo: https://github.com/freetdi/tdlib

Dependencies
------------

- None
- https://gitlab.com/freetdi/treedec
- https://github.com/freetdi/tdlib
- https://github.com/felix-salfelder
7 changes: 4 additions & 3 deletions build/pkgs/tdlib/checksums.ini
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
tarball=tdlib-VERSION.tar.gz
sha1=8e200d0e3ac009030f3ada6658d20717e433220f
sha256=5a40375e738e9e6dbd37f53e54deb1efa6b58f154d83b7bfeaee9f47d47b444b
tarball=treedec-VERSION.tar.gz
sha1=355930ce66a14afed89d32ead280bfdd801d53d7
sha256=16f9683af4c33e3e79fe36439cb4bb4b63216ad88d59f5dc00dd3fb9256aa4ae
upstream_url=https://www.algok.uni-bamberg.de/treedec/treedec-VERSION.tar.gz
1 change: 1 addition & 0 deletions build/pkgs/tdlib/dependencies
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
boost_cropped
2 changes: 1 addition & 1 deletion build/pkgs/tdlib/package-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.3.1.p0
0.9.3.p0
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
From f9bea896a49ef909aeb910c140661ab06b3b6a0b Mon Sep 17 00:00:00 2001
From: Matthias Koeppe <[email protected]>
Date: Fri, 7 Jun 2024 12:21:28 -0700
Subject: [PATCH] src/exact_cutset.hpp: Suppress 'incomplete' message

---
src/exact_cutset.hpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/exact_cutset.hpp b/src/exact_cutset.hpp
index 782bb96..2caa7bd 100755
--- a/src/exact_cutset.hpp
+++ b/src/exact_cutset.hpp
@@ -994,7 +994,7 @@ bool exact_cutset<G_t, config>::try_it(T_t &T, unsigned bagsize)
}else{
// incomplete(); //no//
// messes up random tests, send to cerr instead
- std::cerr << "incomplete ../../src/exact_cutset.hpp:978:try_it\n";
+ // std::cerr << "incomplete ../../src/exact_cutset.hpp:978:try_it\n";
}

typename boost::graph_traits<G_t>::vertex_iterator vIt, vEnd;
--
2.42.0

2 changes: 1 addition & 1 deletion build/pkgs/tdlib/spkg-install.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cd src

sdh_configure
sdh_configure --with-python=no
sdh_make
sdh_make_install -j1
11 changes: 2 additions & 9 deletions src/sage/graphs/graph_decompositions/sage_tdlib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
#include <map>

#include <boost/graph/adjacency_list.hpp>
#include "tdlib/TD_combinations.hpp"
#include "tdlib/TD_misc.hpp"
#include <treedec/combinations.hpp>
#include <treedec/misc.hpp>

#ifndef TD_STRUCT_VERTEX
#define TD_STRUCT_VERTEX
Expand All @@ -18,13 +18,6 @@ struct Vertex{

typedef boost::adjacency_list<boost::setS, boost::vecS, boost::undirectedS, Vertex> TD_graph_t;

struct bag{
std::set<unsigned int> bag;
};

typedef boost::adjacency_list<boost::vecS, boost::vecS, boost::undirectedS, bag> TD_tree_dec_t;


void make_tdlib_graph(TD_graph_t &G, std::vector<unsigned int> &V, std::vector<unsigned int> &E){
unsigned int max = 0;
for(unsigned int i = 0; i < V.size(); i++)
Expand Down
7 changes: 6 additions & 1 deletion src/sage/graphs/graph_decompositions/tree_decomposition.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ The treewidth of a clique is `n-1` and its treelength is 1::

- Approximation of treelength based on :meth:`~sage.graphs.graph.Graph.lex_M`
- Approximation of treelength based on BFS Layering
- upgrade tdlib to 0.9.0 :issue:`30813`


Methods
Expand Down Expand Up @@ -619,6 +618,12 @@ def treewidth(g, k=None, kmin=None, certificate=False, algorithm=None, nice=Fals
sage: g.treewidth(algorithm='sage', certificate=True, kmin=4)
Tree decomposition: Graph on 4 vertices

Check that :issue:`38159` is fixed ::

sage: G = Graph('I~~}vPlr_')
sage: G.treewidth(algorithm='sage') == G.treewidth(algorithm='tdlib') # optional - tdlib
True

Trivially true::

sage: graphs.PetersenGraph().treewidth(k=35)
Expand Down