diff options
author | glisse <glisse@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2017-02-24 14:31:07 +0000 |
---|---|---|
committer | glisse <glisse@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2017-02-24 14:31:07 +0000 |
commit | 4058239b54f6a04b8f4be29228e84f88288d9177 (patch) | |
tree | da20bb5d80a805977915d22455261a2613769a56 /src/common | |
parent | dcdc542310a90fea6493e54d1c76e97fbe6dc59e (diff) | |
parent | 18a13841ce995148b0c46a35ee9209626f6bf3d5 (diff) |
Let choose_n_farthest_points output distances (optional).
Drop unused CGAL includes.
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/farthest_distance@2107 636b058d-ea47-450e-bf9e-a15bfbe3eedb
Former-commit-id: 1e56514dc32af0eb12a52a86c19e5c815e560c7d
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/include/gudhi/Null_output_iterator.h | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/src/common/include/gudhi/Null_output_iterator.h b/src/common/include/gudhi/Null_output_iterator.h new file mode 100644 index 00000000..0cf043cd --- /dev/null +++ b/src/common/include/gudhi/Null_output_iterator.h @@ -0,0 +1,48 @@ +/* This file is part of the Gudhi Library. The Gudhi library + * (Geometric Understanding in Higher Dimensions) is a generic C++ + * library for computational topology. + * + * Author(s): Marc Glisse + * + * Copyright (C) 2017 INRIA + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef NULL_OUTPUT_ITERATOR_H_ +#define NULL_OUTPUT_ITERATOR_H_ + +#include <iterator> + +namespace Gudhi { + +/** An output iterator that ignores whatever it is given. */ +struct Null_output_iterator { + typedef std::output_iterator_tag iterator_category; + typedef void value_type; + typedef void difference_type; + typedef void pointer; + typedef void reference; + + Null_output_iterator& operator++(){return *this;} + Null_output_iterator operator++(int){return *this;} + struct proxy { + template<class T> + proxy& operator=(T&&){return *this;} + }; + proxy operator*()const{return {};} +}; +} // namespace Gudhi + +#endif // NULL_OUTPUT_ITERATOR_H_ |