Skip to content

Commit

Permalink
Marking old implementation deprecated
Browse files Browse the repository at this point in the history
  • Loading branch information
tdegeus committed Nov 25, 2023
1 parent 20faca6 commit 011ac5d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion include/GooseEYE/GooseEYE.h
Original file line number Diff line number Diff line change
Expand Up @@ -799,7 +799,7 @@ class ClusterLabeller {
/**
* Compute clusters and obtain certain characteristic about them.
*/
class Clusters {
class [[deprecated]] Clusters {
public:
Clusters() = default;

Expand All @@ -825,6 +825,9 @@ class Clusters {
template <class T, class S>
Clusters(const T& f, const S& kernel, bool periodic = true) : m_periodic(periodic)
{
GOOSEEYE_WARNING_PYTHON("Clusters is deprecated, use ClusterLabeller (new API) instead "
"(please open a PR for missing functions)");

static_assert(std::is_integral<typename T::value_type>::value, "Integral labels required.");
static_assert(std::is_integral<typename S::value_type>::value, "Integral kernel required.");

Expand Down
2 changes: 1 addition & 1 deletion python/GooseEYE/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def ClusterLabeller(shape, periodic=True, **kwargs):
if periodic:
return ClusterLabeller2p(shape, **kwargs)
return ClusterLabeller2(shape, **kwargs)
raise NotImplementedError
raise NotImplementedError("3d extension needed, please open a PR")


class Structure(enstat.static):
Expand Down

0 comments on commit 011ac5d

Please sign in to comment.