include/topology/conesimplex.hpp
author Dmitriy Morozov <morozov@cs.duke.edu>
Thu, 27 Dec 2007 00:00:00 -0500
changeset 43 0f970f454094
parent 22 c42734397d62
permissions -rw-r--r--
Added initial Avida code (computes 0-dimensional persistence of the hamming distance function)

template<class S>
typename ConeSimplex<S>::Cycle
ConeSimplex<S>::boundary() const
{
	Cycle bdry;
	typename Parent::Cycle pbdry = Parent::boundary();

	for (typename Parent::Cycle::const_iterator cur = pbdry.begin(); cur != pbdry.end(); ++cur)
		bdry.push_back(Self(*cur, coned_));
	
	if (coned_)
		bdry.push_back(Self(*this, false));
	
	return bdry;
}

template<class S>
std::ostream&
ConeSimplex<S>::operator<<(std::ostream& out) const
{
	Parent::operator<<(out) << ' ';
	if (coned_) out << "[coned]";
	return out;
}