diff options
Diffstat (limited to 'concept')
20 files changed, 107 insertions, 35 deletions
diff --git a/concept/Alpha_complex/SimplicialComplexForAlpha.h b/concept/Alpha_complex/SimplicialComplexForAlpha.h index 2b8bff94..a51df127 100644 --- a/concept/Alpha_complex/SimplicialComplexForAlpha.h +++ b/concept/Alpha_complex/SimplicialComplexForAlpha.h @@ -4,7 +4,7 @@ * * Author(s): Vincent Rouvreau * - * Copyright (C) 2016 INRIA + * Copyright (C) 2016 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 diff --git a/concept/Bottleneck_distance/Persistence_diagram.h b/concept/Bottleneck_distance/Persistence_diagram.h index b157f22a..d016faf4 100644 --- a/concept/Bottleneck_distance/Persistence_diagram.h +++ b/concept/Bottleneck_distance/Persistence_diagram.h @@ -4,7 +4,7 @@ * * Author: François Godi * - * Copyright (C) 2015 INRIA + * Copyright (C) 2015 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 diff --git a/concept/Cech_complex/SimplicialComplexForCech.h b/concept/Cech_complex/SimplicialComplexForCech.h new file mode 100644 index 00000000..89231eec --- /dev/null +++ b/concept/Cech_complex/SimplicialComplexForCech.h @@ -0,0 +1,66 @@ +/* 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): Vincent Rouvreau + * + * Copyright (C) 2018 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 CONCEPT_CECH_COMPLEX_SIMPLICIAL_COMPLEX_FOR_CECH_H_ +#define CONCEPT_CECH_COMPLEX_SIMPLICIAL_COMPLEX_FOR_CECH_H_ + +namespace Gudhi { + +namespace cech_complex { + +/** \brief The concept SimplicialComplexForCech describes the requirements for a type to implement a simplicial + * complex, that can be created from a `Cech_complex`. + */ +struct SimplicialComplexForCech { + /** Handle to specify a simplex. */ + typedef unspecified Simplex_handle; + /** Handle to specify a vertex. Must be a non-negative integer. */ + typedef unspecified Vertex_handle; + /** Handle to specify the simplex filtration value. */ + typedef unspecified Filtration_value; + + /** Assigns the 'simplex' with the given 'filtration' value. */ + int assign_filtration(Simplex_handle simplex, Filtration_value filtration); + + /** \brief Returns a range over vertices of a given + * simplex. */ + Simplex_vertex_range simplex_vertex_range(Simplex_handle const & simplex); + + /** \brief Inserts a given `Gudhi::ProximityGraph` in the simplicial complex. */ + template<class ProximityGraph> + void insert_graph(const ProximityGraph& proximity_graph); + + /** \brief Expands the simplicial complex containing only its one skeleton until a given maximal dimension. + * expansion can be blocked by the blocker oracle. */ + template< typename Blocker > + void expansion_with_blockers(int max_dim, Blocker block_simplex); + + /** Returns the number of vertices in the simplicial complex. */ + std::size_t num_vertices(); + +}; + +} // namespace alpha_complex + +} // namespace Gudhi + +#endif // CONCEPT_ALPHA_COMPLEX_SIMPLICIAL_COMPLEX_FOR_ALPHA_H_ diff --git a/concept/Persistence_representations/Real_valued_topological_data.h b/concept/Persistence_representations/Real_valued_topological_data.h index 1d3595ad..22ef6d72 100644 --- a/concept/Persistence_representations/Real_valued_topological_data.h +++ b/concept/Persistence_representations/Real_valued_topological_data.h @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2016 INRIA (France) + * Copyright (C) 2016 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 diff --git a/concept/Persistence_representations/Topological_data_with_averages.h b/concept/Persistence_representations/Topological_data_with_averages.h index 9ebd105f..aa64467f 100644 --- a/concept/Persistence_representations/Topological_data_with_averages.h +++ b/concept/Persistence_representations/Topological_data_with_averages.h @@ -5,7 +5,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2016 INRIA (France) + * Copyright (C) 2016 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 diff --git a/concept/Persistence_representations/Topological_data_with_distances.h b/concept/Persistence_representations/Topological_data_with_distances.h index a6a62307..c8eb2b34 100644 --- a/concept/Persistence_representations/Topological_data_with_distances.h +++ b/concept/Persistence_representations/Topological_data_with_distances.h @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2016 INRIA (France) + * Copyright (C) 2016 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 diff --git a/concept/Persistence_representations/Topological_data_with_scalar_product.h b/concept/Persistence_representations/Topological_data_with_scalar_product.h index 2e506ca9..0f08b8c6 100644 --- a/concept/Persistence_representations/Topological_data_with_scalar_product.h +++ b/concept/Persistence_representations/Topological_data_with_scalar_product.h @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2016 INRIA (France) + * Copyright (C) 2016 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 diff --git a/concept/Persistence_representations/Vectorized_topological_data.h b/concept/Persistence_representations/Vectorized_topological_data.h index b6b5b109..365105d6 100644 --- a/concept/Persistence_representations/Vectorized_topological_data.h +++ b/concept/Persistence_representations/Vectorized_topological_data.h @@ -4,7 +4,7 @@ * * Author(s): Pawel Dlotko * - * Copyright (C) 2016 INRIA (France) + * Copyright (C) 2016 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 diff --git a/concept/Persistent_cohomology/CoefficientField.h b/concept/Persistent_cohomology/CoefficientField.h index 953b06c2..9d066cca 100644 --- a/concept/Persistent_cohomology/CoefficientField.h +++ b/concept/Persistent_cohomology/CoefficientField.h @@ -4,7 +4,7 @@ * * Author(s): Clément Maria * - * Copyright (C) 2014 INRIA Sophia Antipolis-Méditerranée (France) + * Copyright (C) 2014 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 diff --git a/concept/Persistent_cohomology/FilteredComplex.h b/concept/Persistent_cohomology/FilteredComplex.h index c19698df..62b9002f 100644 --- a/concept/Persistent_cohomology/FilteredComplex.h +++ b/concept/Persistent_cohomology/FilteredComplex.h @@ -4,7 +4,7 @@ * * Author(s): Clément Maria * - * Copyright (C) 2014 INRIA Sophia Antipolis-Méditerranée (France) + * Copyright (C) 2014 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 @@ -29,10 +29,6 @@ struct FilteredComplex { /** Handle to specify a simplex. */ typedef unspecified Simplex_handle; -/** \brief Key associated to each simplex. - * - * Must be a signed integer type. */ - typedef unspecified Simplex_key; /** \brief Type for the value of the filtration function. * * Must be comparable with <. */ @@ -58,20 +54,10 @@ struct FilteredComplex * filtration function on the complex. */ Filtration_value filtration(Simplex_handle sh); -/** \brief Returns a key that is different from the keys associated - * to the simplices. */ - Simplex_key null_key (); -/** \brief Returns the key associated to a simplex. - * - * This is never called on null_simplex(). */ - Simplex_key key ( Simplex_handle sh ); /** \brief Returns the simplex that has index idx in the filtration. * - * This is never called on null_key(). */ - Simplex_handle simplex ( Simplex_key idx ); -/** \brief Assign a key to a simplex. */ - void assign_key(Simplex_handle sh, Simplex_key key); - + * This is only called on valid indices. */ + Simplex_handle simplex ( size_t idx ); /** \brief Iterator on the simplices belonging to the * boundary of a simplex. * @@ -115,6 +101,26 @@ typedef unspecified Filtration_simplex_range; * .begin() and .end() return type Filtration_simplex_iterator.*/ Filtration_simplex_range filtration_simplex_range(); +/** \name Map interface + * Conceptually a `std::unordered_map<Simplex_handle,std::size_t>`. + * @{ */ +/** \brief Data stored for each simplex. + * + * Must be an integer type. */ + typedef unspecified Simplex_key; +/** \brief Returns a constant dummy number that is either negative, + * or at least as large as `num_simplices()`. Suggested value: -1. */ + Simplex_key null_key (); +/** \brief Returns the number stored for a simplex by `assign_key`. + * + * This is never called on null_simplex(). */ + Simplex_key key ( Simplex_handle sh ); +/** \brief Store a number for a simplex, which can later be retrieved with `key(sh)`. + * + * This is never called on null_simplex(). */ + void assign_key(Simplex_handle sh, Simplex_key n); +/** @} */ + /* \brief Iterator over the simplices of the complex, * in an arbitrary order. diff --git a/concept/Persistent_cohomology/PersistentHomology.h b/concept/Persistent_cohomology/PersistentHomology.h index 111723a5..f9a78763 100644 --- a/concept/Persistent_cohomology/PersistentHomology.h +++ b/concept/Persistent_cohomology/PersistentHomology.h @@ -4,7 +4,7 @@ * * Author(s): Clément Maria * - * Copyright (C) 2014 INRIA Sophia Antipolis-Méditerranée (France) + * Copyright (C) 2014 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 diff --git a/concept/Rips_complex/SimplicialComplexForRips.h b/concept/Rips_complex/SimplicialComplexForRips.h index 7dab0615..3c5acecf 100644 --- a/concept/Rips_complex/SimplicialComplexForRips.h +++ b/concept/Rips_complex/SimplicialComplexForRips.h @@ -4,7 +4,7 @@ * * Author(s): Vincent Rouvreau * - * Copyright (C) 2016 INRIA + * Copyright (C) 2016 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 diff --git a/concept/Simplex_tree/FiltrationValue.h b/concept/Simplex_tree/FiltrationValue.h index 79ca06cc..f4dcf985 100644 --- a/concept/Simplex_tree/FiltrationValue.h +++ b/concept/Simplex_tree/FiltrationValue.h @@ -4,7 +4,7 @@ * * Author(s): Clément Maria * - * Copyright (C) 2014 INRIA Sophia Antipolis-Méditerranée (France) + * Copyright (C) 2014 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 diff --git a/concept/Simplex_tree/IndexingTag.h b/concept/Simplex_tree/IndexingTag.h index 1dcdd756..37e7e294 100644 --- a/concept/Simplex_tree/IndexingTag.h +++ b/concept/Simplex_tree/IndexingTag.h @@ -4,7 +4,7 @@ * * Author(s): Clément Maria * - * Copyright (C) 2014 INRIA Sophia Antipolis-Méditerranée (France) + * Copyright (C) 2014 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 diff --git a/concept/Simplex_tree/SimplexKey.h b/concept/Simplex_tree/SimplexKey.h index 9fbed401..c03f7da1 100644 --- a/concept/Simplex_tree/SimplexKey.h +++ b/concept/Simplex_tree/SimplexKey.h @@ -4,7 +4,7 @@ * * Author(s): Clément Maria * - * Copyright (C) 2014 INRIA Sophia Antipolis-Méditerranée (France) + * Copyright (C) 2014 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 diff --git a/concept/Simplex_tree/SimplexTreeOptions.h b/concept/Simplex_tree/SimplexTreeOptions.h index 89acdc18..6638da26 100644 --- a/concept/Simplex_tree/SimplexTreeOptions.h +++ b/concept/Simplex_tree/SimplexTreeOptions.h @@ -4,7 +4,7 @@ * * Author(s): Marc Glisse * - * Copyright (C) 2015 INRIA Saclay - Ile-de-France (France) + * Copyright (C) 2015 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 diff --git a/concept/Simplex_tree/VertexHandle.h b/concept/Simplex_tree/VertexHandle.h index 3efbba61..9d0642c3 100644 --- a/concept/Simplex_tree/VertexHandle.h +++ b/concept/Simplex_tree/VertexHandle.h @@ -4,7 +4,7 @@ * * Author(s): Clément Maria * - * Copyright (C) 2014 INRIA Sophia Antipolis-Méditerranée (France) + * Copyright (C) 2014 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 diff --git a/concept/Skeleton_blocker/SkeletonBlockerDS.h b/concept/Skeleton_blocker/SkeletonBlockerDS.h index d82425a0..fd806ff1 100644 --- a/concept/Skeleton_blocker/SkeletonBlockerDS.h +++ b/concept/Skeleton_blocker/SkeletonBlockerDS.h @@ -4,7 +4,7 @@ * * Author(s): David Salinas * - * Copyright (C) 2014 INRIA + * Copyright (C) 2014 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 diff --git a/concept/Skeleton_blocker/SkeletonBlockerGeometricDS.h b/concept/Skeleton_blocker/SkeletonBlockerGeometricDS.h index 477464c4..d8521343 100644 --- a/concept/Skeleton_blocker/SkeletonBlockerGeometricDS.h +++ b/concept/Skeleton_blocker/SkeletonBlockerGeometricDS.h @@ -4,7 +4,7 @@ * * Author(s): David Salinas * - * Copyright (C) 2014 INRIA + * Copyright (C) 2014 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 diff --git a/concept/Witness_complex/SimplicialComplexForWitness.h b/concept/Witness_complex/SimplicialComplexForWitness.h index d78cc83f..8b85f4e4 100644 --- a/concept/Witness_complex/SimplicialComplexForWitness.h +++ b/concept/Witness_complex/SimplicialComplexForWitness.h @@ -4,7 +4,7 @@ * * Author(s): Siargey Kachanovich * - * Copyright (C) 2014 INRIA Sophia Antipolis-Méditerranée (France) + * Copyright (C) 2014 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 |