[Debtags-commits] [svn] r1393 - in tagcoll/trunk: . tagcoll tests

Enrico Zini enrico at costa.debian.org
Fri Oct 21 17:20:13 UTC 2005


Author: enrico
Date: Fri Oct 21 17:20:12 2005
New Revision: 1393

Modified:
   tagcoll/trunk/   (props changed)
   tagcoll/trunk/README
   tagcoll/trunk/tagcoll/experiments.cc
   tagcoll/trunk/tagcoll/experiments.h
   tagcoll/trunk/tests/mkgraph.cc
Log:
 r5579 at viaza:  enrico | 2005-10-21 19:20:05 +0200
 More tuning trials


Modified: tagcoll/trunk/README
==============================================================================
--- tagcoll/trunk/README	(original)
+++ tagcoll/trunk/README	Fri Oct 21 17:20:12 2005
@@ -167,6 +167,8 @@
 
 These are the TODO-list items currently being worked on::
 
+ - Read http://people.lis.uiuc.edu/~twidale/irinterfaces/4othersystems.html
+
  - Replace ParserInputs with C++ isostreams
 
  - Two navigational modes:

Modified: tagcoll/trunk/tagcoll/experiments.cc
==============================================================================
--- tagcoll/trunk/tagcoll/experiments.cc	(original)
+++ tagcoll/trunk/tagcoll/experiments.cc	Fri Oct 21 17:20:12 2005
@@ -259,8 +259,11 @@
 }
 
 template<typename ITEM, typename TAG>
-void Graph<ITEM,TAG>::buildSubGraph(std::ostream& out, const OpSet<TAG>& node, OpSet< OpSet<TAG> >& selected, int maxdist)
+void Graph<ITEM,TAG>::buildSubGraph(std::ostream& out, const OpSet<TAG>& node, OpSet< OpSet<TAG> >& selected, int maxdist, int maxlev)
 {
+	if (maxlev == 0)
+		return;
+
 	// Lay out the nodes in order of distance
 	for (int i = 1; i <= maxdist && !selected.empty(); i++)
 	{
@@ -289,6 +292,7 @@
 				// Connect to the main node
 				out << "node" << getHandle(node) << "--node" << getHandle(*j) << "[" <<
 					"label=\"" << diff << "\"," <<
+					"fontsize=8," <<
 					"weight=\"" << i << "\"" <<
 					"];" << endl;
 				connected.push_back(*j);
@@ -306,7 +310,7 @@
 				j != connected.end(); j++)
 		{
 			OpSet< OpSet<TAG> > subselected(selected);
-			buildSubGraph(out, *j, subselected, maxdist - i);
+			buildSubGraph(out, *j, subselected, maxdist - i, maxlev - 1);
 			removed += selected - subselected;
 		}
 
@@ -316,7 +320,7 @@
 
 
 template<typename ITEM, typename TAG>
-void Graph<ITEM,TAG>::buildGraph(std::ostream& out, const OpSet<TAG>& node, int maxdist)
+void Graph<ITEM,TAG>::buildGraph(std::ostream& out, const OpSet<TAG>& node, int maxdist, int maxlev)
 {
 	int dist;
 
@@ -345,7 +349,7 @@
 				"];" << endl;
 		}
 
-	buildSubGraph(out, node, selected, maxdist);
+	buildSubGraph(out, node, selected, maxdist, maxlev);
 
 #if 0
 		if (i->second.distance(node) == 1)

Modified: tagcoll/trunk/tagcoll/experiments.h
==============================================================================
--- tagcoll/trunk/tagcoll/experiments.h	(original)
+++ tagcoll/trunk/tagcoll/experiments.h	Fri Oct 21 17:20:12 2005
@@ -118,12 +118,12 @@
 	std::map< OpSet<TAG>, int > handles;
 
 	int getHandle(const OpSet<TAG>& node);
-	void buildSubGraph(std::ostream& out, const OpSet<TAG>& node, OpSet< OpSet<TAG> >& selected, int maxdist);
+	void buildSubGraph(std::ostream& out, const OpSet<TAG>& node, OpSet< OpSet<TAG> >& selected, int maxdist, int maxlev);
 
 public:
 	Graph() : seq(0) {}
 
-	void buildGraph(std::ostream& out, const OpSet<TAG>& node, int maxdist = 3);
+	void buildGraph(std::ostream& out, const OpSet<TAG>& node, int maxdist = 3, int maxlev = 3);
 	void buildGraphs(const std::string& dir, int maxdist = 3);
 };
 

Modified: tagcoll/trunk/tests/mkgraph.cc
==============================================================================
--- tagcoll/trunk/tests/mkgraph.cc	(original)
+++ tagcoll/trunk/tests/mkgraph.cc	Fri Oct 21 17:20:12 2005
@@ -21,7 +21,7 @@
 
 		TextFormat<string, string>::parse(conv, conv, in, graph);
 
-		graph.buildGraphs("graph2", 3.0);
+		graph.buildGraphs("graph-dist1", 1);
 
 		//TextFormat<string, string> writer(conv, conv, stdout);
 		//graph.output(writer);



More information about the Debtags-commits mailing list