Merged the branch resulting from the upstream pull
authorDmitriy Morozov <morozov@cs.duke.edu>
Sun, 17 Feb 2008 09:16:30 -0500
changeset 45 7c15f27bfa1b
parent 44 0bf12743641f (current diff)
parent 42 07510f86b517 (diff)
child 46 6fbe003aad9d
Merged the branch resulting from the upstream pull
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/.issues/8a14b4849071f910	Sun Feb 17 09:16:30 2008 -0500
@@ -0,0 +1,9 @@
+From artemis Thu Jan 10 09:43:00 2008
+From: Dmitriy Morozov <morozov@cs.duke.edu>
+Date: Thu, 10 Jan 2008 04:36:03 -0500
+State: new
+Subject: Remove maintenance of "lazy decomposition"
+Message-Id: <8a14b4849071f910-0-artemis@metatron>
+
+The maintenance of "lazy decomposition" (added in [a0736dd3c671]) is
+incorrect (due to original theoretical errors). Remove it completely.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/.issues/e6d9deee8fbd81a5	Sun Feb 17 09:16:30 2008 -0500
@@ -0,0 +1,8 @@
+From artemis Wed Feb  6 21:45:35 2008
+From: Dmitriy Morozov <morozov@cs.duke.edu>
+Date: Wed, 06 Feb 2008 16:45:13 -0500
+State: new
+Subject: About section in README
+Message-Id: <e6d9deee8fbd81a5-0-artemis@metatron>
+
+Add "About" section to the README file.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/.issues/e8659770a6824e01	Sun Feb 17 09:16:30 2008 -0500
@@ -0,0 +1,11 @@
+From artemis Wed Jan  9 18:59:35 2008
+From: Dmitriy Morozov <morozov@cs.duke.edu>
+Date: Wed, 09 Jan 2008 13:57:57 -0500
+State: new
+Subject: Change cout to rlog
+Message-Id: <e8659770a6824e01-0-artemis@metatron>
+
+In examples/grid/grid2Dvineyard.hpp (and in examples in general),
+change the use of std::cout for logging information to rlog.
+Naturally, create appropriate channels even if they are of only local
+use.
--- a/examples/grid/grid2Dvineyard.h	Sun Feb 17 09:16:00 2008 -0500
+++ b/examples/grid/grid2Dvineyard.h	Sun Feb 17 09:16:30 2008 -0500
@@ -1,6 +1,6 @@
 /*
  * Author: Dmitriy Morozov
- * Department of Computer Science, Duke University, 2005 -- 2006
+ * Department of Computer Science, Duke University, 2005 -- 2008
  */
 
 #ifndef __GRID2DVINEYARD_H__
@@ -21,8 +21,11 @@
 	public:
 		typedef					Grid2DVineyard										Self;
 			
-		class					VertexType;
-		typedef					std::vector<VertexType>								VertexVector;
+		typedef					Grid2D::CoordinateIndex								CoordinateIndex;
+		typedef					Grid2D::ValueType									ValueType;
+
+		class					KineticVertexType;
+		typedef					std::vector<KineticVertexType>						VertexVector;
 		typedef					VertexVector::iterator								VertexIndex;
 		
 		typedef					LowerStarFiltration<VertexIndex>					LSFiltration; 
@@ -31,12 +34,11 @@
 		class					KineticEvaluator;
 		class 					VertexComparison;
 		
-		typedef					Grid2D::CoordinateIndex								CoordinateIndex;
-		typedef					Grid2D::ValueType									ValueType;
-
 		typedef					LSFiltration::Index									Index;
 		typedef					LSFiltration::Simplex								Simplex;
 		typedef					LSFiltration::VertexOrderIndex						VertexOrderIndex;
+		typedef					LSFiltration::VertexType<CoordinateIndex>			LSVertexType;
+
 		typedef					LSFiltration::Vineyard								Vineyard;
 		typedef					Vineyard::Evaluator									Evaluator;
 
@@ -103,22 +105,15 @@
 
 //BOOST_CLASS_EXPORT(Grid2DVineyard)
 	
-class Grid2DVineyard::VertexType
+class Grid2DVineyard::KineticVertexType: public LSVertexType
 {
 	public:
-		VertexType(CoordinateIndex ii = 0): i_(ii)											{}
-		
-		CoordinateIndex			index() const												{ return i_; }
-		void					set_index(CoordinateIndex i)								{ i_ = i; }
-		VertexOrderIndex		get_order() const											{ return order_; }
-		void					set_order(const VertexOrderIndex& o)						{ order_ = o; }
+		typedef					LSVertexType												Parent;
 		
 		Key						kinetic_key() const											{ return key_; }
 		void					set_kinetic_key(Key k)										{ key_ = k; }
 		
 	private:
-		CoordinateIndex			i_;
-		VertexOrderIndex		order_;
 		Key						key_;
 };
 
--- a/include/topology/lowerstarfiltration.h	Sun Feb 17 09:16:00 2008 -0500
+++ b/include/topology/lowerstarfiltration.h	Sun Feb 17 09:16:30 2008 -0500
@@ -1,6 +1,6 @@
 /*
  * Author: Dmitriy Morozov
- * Department of Computer Science, Duke University, 2005 -- 2006
+ * Department of Computer Science, Duke University, 2005 -- 2008
  */
 
 #ifndef __LOWERSTARFILTRATION_H__
@@ -41,6 +41,9 @@
 		typedef					typename Parent::Trail								Trail;
 		typedef					typename Simplex::Cycle 							SimplexBoundaryCycle;
 
+		template<class IndexType>		
+		class 					VertexType;
+
 		struct 					VertexDescriptor;
 		typedef					ConsistencyList<VertexDescriptor>					VertexOrder;
 		typedef					typename VertexOrder::iterator						VertexOrderIndex;
@@ -90,8 +93,34 @@
 		BOOST_SERIALIZATION_SPLIT_MEMBER()
 };
 
+/**
+ * Helper class that describes lower star vertex type. Defines essential
+ * methods that LowerStarFiltration expects from its vertex type. Actual 
+ * vertex types should inherit from it.
+ */
 template<class VI, class Smplx, class FltrSmplx, class Vnrd>
-struct LowerStarFiltration<VI,Smplx,FltrSmplx,Vnrd>::VertexDescriptor
+template<class IndexType_> 
+class LowerStarFiltration<VI,Smplx,FltrSmplx,Vnrd>::
+VertexType
+{
+	public:
+		typedef					IndexType_													IndexType;
+
+		VertexType(IndexType ii = 0): i_(ii)												{}
+		
+		IndexType				index() const												{ return i_; }
+		void					set_index(IndexType i)										{ i_ = i; }
+		VertexOrderIndex		get_order() const											{ return order_; }
+		void					set_order(const VertexOrderIndex& o)						{ order_ = o; }
+
+	private:
+		IndexType				i_;
+		VertexOrderIndex		order_;
+};
+
+template<class VI, class Smplx, class FltrSmplx, class Vnrd>
+struct LowerStarFiltration<VI,Smplx,FltrSmplx,Vnrd>::
+VertexDescriptor
 {
 	VertexDescriptor(VertexIndex vi, Index si): 
 		vertex_index(vi), simplex_index(si)		
@@ -102,7 +131,8 @@
 };
 
 template<class VI, class Smplx, class FltrSmplx, class Vnrd>
-struct LowerStarFiltration<VI,Smplx,FltrSmplx,Vnrd>::SimplexAttachmentComparison
+struct LowerStarFiltration<VI,Smplx,FltrSmplx,Vnrd>::
+SimplexAttachmentComparison
 {
 	bool operator()(const Simplex& first, const Simplex& second) const;
 	VertexOrderComparison	vertex_cmp;
--- a/include/topology/lowerstarfiltration.hpp	Sun Feb 17 09:16:00 2008 -0500
+++ b/include/topology/lowerstarfiltration.hpp	Sun Feb 17 09:16:30 2008 -0500
@@ -11,6 +11,11 @@
 static Counter*  cLowerStarChangedAttachment =		 	GetCounter("lowerstar/ChangedAttachment");
 #endif // COUNTERS
 
+
+/**
+ * Copies vertices [begin, end), orders them by cmp, and 
+ * records which vineyard to use in case of transpositions.
+ */
 template<class VI, class Smplx, class FltrSmplx, class Vnrd>
 template<class VertexCmp>
 LowerStarFiltration<VI,Smplx,FltrSmplx,Vnrd>::