-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rework simplex tree options #978
Merged
VincentRouvreau
merged 16 commits into
GUDHI:master
from
VincentRouvreau:rework_simplex_tree_options
Nov 20, 2023
+242
−181
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
5326b9a
Move simplex tree options in a separated header
VincentRouvreau c0d3d1b
Move simplex tree options in a separated header. No doc for Simplex_t…
VincentRouvreau f9c231e
Default (replacing full_feature as default), minimal and full_feature…
VincentRouvreau 99fc4dd
Merge branch 'master' into rework_simplex_tree_options
VincentRouvreau 8d2cf62
Merge remote-tracking branch 'upstream/master' into rework_simplex_tr…
VincentRouvreau 73e62bd
Fix simplex_tree_edge_expansion_unit_test after its merge
VincentRouvreau 9c6bdc2
code review: this was not part of a code review, but inspired from so…
VincentRouvreau ae70563
code review: custom simplex tree options for the cofaces access bench…
VincentRouvreau 69e7956
code review: More comments
VincentRouvreau 64cebe9
code review: Add some details on Simplex_tree_options_default
VincentRouvreau b534bcf
code review: activate stable simplex handles on full featured options
VincentRouvreau 0dea35e
Update src/Simplex_tree/include/gudhi/Simplex_tree/simplex_tree_optio…
VincentRouvreau 364fcd5
Merge branch 'rework_simplex_tree_options' of github.com:VincentRouvr…
VincentRouvreau 55f9f8e
code review: use Simplex_tree_interface instead of Simplex_tree<Simpl…
VincentRouvreau 0a82c1e
code review: rework comments about Simplex tree options
VincentRouvreau a6c5e0a
code review: remove insert_simplex_and_subfaces as not used and incom…
VincentRouvreau File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
96 changes: 96 additions & 0 deletions
96
src/Simplex_tree/include/gudhi/Simplex_tree/simplex_tree_options.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. | ||
* See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. | ||
* Author(s): Vincent Rouvreau | ||
* | ||
* Copyright (C) 2023 Inria | ||
* | ||
* Modification(s): | ||
* - YYYY/MM Author: Description of the modification | ||
*/ | ||
|
||
#ifndef SIMPLEX_TREE_SIMPLEX_TREE_OPTIONS_H_ | ||
#define SIMPLEX_TREE_SIMPLEX_TREE_OPTIONS_H_ | ||
|
||
#include <gudhi/Simplex_tree/indexing_tag.h> | ||
|
||
#include <cstdint> | ||
|
||
namespace Gudhi { | ||
|
||
/** \addtogroup simplex_tree | ||
* Pre-defined options for the Simplex_tree. | ||
* @{ | ||
*/ | ||
|
||
/** Model of SimplexTreeOptions. | ||
* | ||
* Default options version of the Simplex_tree. | ||
* | ||
* Maximum number of simplices to compute persistence is <CODE>std::numeric_limits<std::uint32_t>::max()</CODE> | ||
* (about 4 billions of simplices). */ | ||
struct Simplex_tree_options_default { | ||
typedef linear_indexing_tag Indexing_tag; | ||
typedef int Vertex_handle; | ||
typedef double Filtration_value; | ||
typedef std::uint32_t Simplex_key; | ||
static const bool store_key = true; | ||
static const bool store_filtration = true; | ||
static const bool contiguous_vertices = false; | ||
static const bool link_nodes_by_label = false; | ||
static const bool stable_simplex_handles = false; | ||
}; | ||
|
||
/** Model of SimplexTreeOptions. | ||
* | ||
* Maximum number of simplices to compute persistence is <CODE>std::numeric_limits<std::uint32_t>::max()</CODE> | ||
* (about 4 billions of simplices). */ | ||
mglisse marked this conversation as resolved.
Show resolved
Hide resolved
|
||
struct Simplex_tree_options_full_featured { | ||
typedef linear_indexing_tag Indexing_tag; | ||
typedef int Vertex_handle; | ||
typedef double Filtration_value; | ||
typedef std::uint32_t Simplex_key; | ||
static const bool store_key = true; | ||
static const bool store_filtration = true; | ||
static const bool contiguous_vertices = false; | ||
static const bool link_nodes_by_label = true; | ||
static const bool stable_simplex_handles = true; | ||
}; | ||
|
||
/** Model of SimplexTreeOptions. | ||
* | ||
* Minimal version of the Simplex_tree. No filtration values are stored and it is impossible to compute persistence | ||
* with these options. */ | ||
struct Simplex_tree_options_minimal { | ||
typedef linear_indexing_tag Indexing_tag; | ||
typedef int Vertex_handle; | ||
typedef double Filtration_value; | ||
typedef std::uint32_t Simplex_key; | ||
mglisse marked this conversation as resolved.
Show resolved
Hide resolved
|
||
static const bool store_key = false; | ||
static const bool store_filtration = false; | ||
static const bool contiguous_vertices = false; | ||
static const bool link_nodes_by_label = false; | ||
static const bool stable_simplex_handles = false; | ||
}; | ||
|
||
/** @private @brief Model of SimplexTreeOptions, faster than `Simplex_tree_options_default` but note the unsafe | ||
* `contiguous_vertices` option. | ||
* | ||
* Maximum number of simplices to compute persistence is <CODE>std::numeric_limits<std::uint32_t>::max()</CODE> | ||
* (about 4 billions of simplices). */ | ||
struct Simplex_tree_options_fast_persistence { | ||
typedef linear_indexing_tag Indexing_tag; | ||
typedef int Vertex_handle; | ||
typedef float Filtration_value; | ||
typedef std::uint32_t Simplex_key; | ||
static const bool store_key = true; | ||
static const bool store_filtration = true; | ||
static const bool contiguous_vertices = true; | ||
static const bool link_nodes_by_label = false; | ||
static const bool stable_simplex_handles = false; | ||
}; | ||
|
||
/** @}*/ // end addtogroup simplex_tree | ||
|
||
} // namespace Gudhi | ||
|
||
#endif // SIMPLEX_TREE_SIMPLEX_TREE_OPTIONS_H_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not this PR, but at some point, for ourselves (not necessarily for users), it would be nice to have a comment explaining where such requirements ("signed") come from.