From c415445c6a30cfdc7abc63dba23e4eb5e7ff98da Mon Sep 17 00:00:00 2001 From: pdlotko Date: Tue, 22 Aug 2017 13:26:44 +0000 Subject: cleaning up the mess with names. git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/persistence_representation_integration@2617 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: cd558be592a050f598fc5a22e012a31b7690c5c6 --- .../persistence_representations_diagrams.pyx | 185 --------------------- .../persistence_representations_intervals.pyx | 185 +++++++++++++++++++++ src/cython/gudhi.pyx.in | 2 +- .../include/persistence_representations_diagrams.h | 123 -------------- .../persistence_representations_intervals.h | 123 ++++++++++++++ 5 files changed, 309 insertions(+), 309 deletions(-) delete mode 100644 src/cython/cython/persistence_representations_diagrams.pyx create mode 100644 src/cython/cython/persistence_representations_intervals.pyx delete mode 100644 src/cython/include/persistence_representations_diagrams.h create mode 100644 src/cython/include/persistence_representations_intervals.h (limited to 'src/cython') diff --git a/src/cython/cython/persistence_representations_diagrams.pyx b/src/cython/cython/persistence_representations_diagrams.pyx deleted file mode 100644 index 45ab4828..00000000 --- a/src/cython/cython/persistence_representations_diagrams.pyx +++ /dev/null @@ -1,185 +0,0 @@ -from cython cimport numeric -from libcpp.vector cimport vector #use similar line if you need string, pair, etc.... -from libcpp.utility cimport pair -from libcpp cimport bool -import os - -"""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): Pawel Dlotko - - Copyright (C) 2017 Swansea University - - 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 . -""" - -__author__ = "Pawel Dlotko" -__copyright__ = "Copyright (C) 2017 Swansea University" -__license__ = "GPL v3" - - - - - - -""" -This is a promisse that there will be a class in this file with the following function signature. Something like C++ predeclaration. -According to Vincent, most of the tutorials in cython suggest to separate pre-declaration below with the definition of the method. Hovewer it seems to create problems, that is why we keep them both here. -""" - -cdef extern from "persistence_representations_diagrams.h" namespace "Gudhi::Persistence_representations": - cdef cppclass Persistence_intervals_interface "Gudhi::Persistence_representations::Persistence_intervals_interface": - Persistence_intervals_interface() - Persistence_intervals_interface(const char* , unsigned ) - Persistence_intervals_interface(const vector[pair[double, double]] intervals) - pair[double, double] get_x_range_interface() const - pair[double, double] get_y_range_interface() const - vector[double] length_of_dominant_intervals_interface(size_t where_to_cut) const - vector[pair[double, double] ] dominant_intervals_interface(size_t where_to_cut) const - vector[size_t] histogram_of_lengths_interface(size_t number_of_bins ) const - vector[size_t] cumulative_histogram_of_lengths_interface(size_t number_of_bins) const - vector[double] characteristic_function_of_diagram_interface(double x_min, double x_max, size_t number_of_bins) const - vector[double] cumulative_characteristic_function_of_diagram_interface(double x_min, double x_max, size_t number_of_bins) const - vector[pair[double, size_t] ] compute_persistent_betti_numbers_interface() const - double project_to_R_interface(int number_of_function) const - size_t number_of_projections_to_R_interface() const - vector[double] vectorize_interface(int number_of_function) const - size_t number_of_vectorize_functions_interface() const - -""" -make sure that here we call the functions from the intermediate .h file, with dummy names, so that later below we can use the same names of the functions as in C++ version. -Over here I need to list all the functions that will be used in the file. So there should be a list of constructors, methors, etc. -to separate the function, use newline. Put there only C++ signature -""" - - - -#convention for python class is PersistenceDiagrams instead of Persistence_diagrams -#for methods it is def num_simplices(self). -cdef class PersistenceIntervals: - """ - Persistence interals is a standard representation of persistent homology. This file provide implementation of a number of operations on persistence diagrams. - """ - - cdef Persistence_intervals_interface * thisptr - - #do we need a fake constructor here, as in case of bitmaps?? - #We do need it so that we have a doc for python becaus ethe documentation only read from __init__, it do not read from __cinit__ - #__ means private memeber - def __init__(self, vector_of_intervals=None, dimension = None, file_with_intervals=''): - """Persistence interals is a standard representation of persistent homology. This file provide implementation of a number of operations on persistence diagrams. - - :param dimensions: A vector of birth-death pairs. - - Or - - :param Gudhi style file togethr with a dimension of birth-death pairs to consider. - """ - - - # The real cython constructor - def __cinit__(self, vector_of_intervals=None, dimension = None, file_with_intervals=''): - if (vector_of_intervals is None) and (file_with_intervals is not ''): - self.thisptr = new Persistence_intervals_interface(file_with_intervals, dimension) - elif (file_with_intervals is not '') and (vector_of_intervals is not None): - if os.path.isfile(file_with_intervals): - self.thisptr = new Persistence_intervals_interface(str.encode(file_with_intervals)) - else: - print("file " + file_with_intervals + " not found.") - else: - print("Persistence interals can be constructed from vector of birth-death pairs, vector_of_intervals or a Gudhi-style file.") - - - - def __dealloc__(self): - if self.thisptr != NULL: - del self.thisptr - - - #from here on this is my try. Do we need to specify the returned type?? - #no, we do not. - def get_x_range(self): - if self.thisptr != NULL: - return self.thisptr.get_x_range_interface() - - def get_y_range(self): - if self.thisptr != NULL: - return self.thisptr.get_y_range_interface() - - def length_of_dominant_intervals(self,where_to_cut): - if (self.thisptr != NULL) and (where_to_cut is not None): - return self.thisptr.length_of_dominant_intervals_interface(where_to_cut) - else: - if (self.thisptr != NULL): - return self.thisptr.dominant_intervals_interface(100)#default argument - - def dominant_intervals(self,where_to_cut): - if (self.thisptr != NULL) and (where_to_cut is not None): - return self.thisptr.dominant_intervals_interface(where_to_cut) - else: - if (self.thisptr != NULL): - return self.thisptr.dominant_intervals_interface(100)#default argument - - def histogram_of_lengths(self,number_of_bins): - if (self.thisptr != NULL) and (number_of_bins is not None): - return self.thisptr.histogram_of_lengths_interface(number_of_bins) - else: - if (self.thisptr != NULL): - return self.thisptr.dominant_intervals_interface(100) #default argument - - def cumulative_histogram_of_lengths(self,number_of_bins): - if (self.thisptr != NULL) and (number_of_bins is not None): - return self.thisptr.cumulative_histogram_of_lengths_interface(number_of_bins) - else: - if (self.thisptr != NULL): - return self.thisptr.cumulative_histogram_of_lengths_interface(10)#default argument - - def characteristic_function_of_diagram(self,x_min,x_max,number_of_bins): - if (self.thisptr != NULL) and ( x_min is not None ) and ( x_max is not None ) and ( number_of_bins is not None ): - return self.thisptr.characteristic_function_of_diagram_interface( x_min , x_max , number_of_bins ) - else: - if (self.thisptr != NULL) and ( x_min is not None ) and ( x_max is not None ): - return self.thisptr.characteristic_function_of_diagram_interface( x_min , x_max ,10 ) #default argument - - def cumulative_characteristic_function_of_diagram(self,x_min,x_max,number_of_bins): - if (self.thisptr != NULL) and ( x_min is not None ) and ( x_max is not None ) and ( number_of_bins is not None ): - return self.thisptr.cumulative_characteristic_function_of_diagram_interface( x_min , x_max , number_of_bins ) - else: - if (self.thisptr != NULL ) and ( x_min is not None ) and ( x_max is not None ): - return self.thisptr.cumulative_characteristic_function_of_diagram_interface( x_min , x_max , 10) #default argument - - def compute_persistent_betti_numbers(self): - if self.thisptr != NULL: - return self.thisptr.compute_persistent_betti_numbers_interface() - - def project_to_R(self,number_of_function): - if (self.thisptr != NULL) and (number_of_function is not None): - return self.thisptr.project_to_R_interface(number_of_function) - - def number_of_projections_to_R(self): - if self.thisptr != NULL: - return self.thisptr.number_of_projections_to_R_interface() - - def vectorize(self,number_of_function): - if (self.thisptr != NULL) and ( number_of_function is not None ): - return self.thisptr.vectorize_interface(number_of_function) - - def number_of_vectorize_functions(self): - if (self.thisptr != NULL): - return self.thisptr.number_of_vectorize_functions_interface() - - - diff --git a/src/cython/cython/persistence_representations_intervals.pyx b/src/cython/cython/persistence_representations_intervals.pyx new file mode 100644 index 00000000..29027801 --- /dev/null +++ b/src/cython/cython/persistence_representations_intervals.pyx @@ -0,0 +1,185 @@ +from cython cimport numeric +from libcpp.vector cimport vector #use similar line if you need string, pair, etc.... +from libcpp.utility cimport pair +from libcpp cimport bool +import os + +"""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): Pawel Dlotko + + Copyright (C) 2017 Swansea University + + 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 . +""" + +__author__ = "Pawel Dlotko" +__copyright__ = "Copyright (C) 2017 Swansea University" +__license__ = "GPL v3" + + + + + + +""" +This is a promisse that there will be a class in this file with the following function signature. Something like C++ predeclaration. +According to Vincent, most of the tutorials in cython suggest to separate pre-declaration below with the definition of the method. Hovewer it seems to create problems, that is why we keep them both here. +""" + +cdef extern from "persistence_representations_intervals.h" namespace "Gudhi::Persistence_representations": + cdef cppclass Persistence_intervals_interface "Gudhi::Persistence_representations::Persistence_intervals_interface": + Persistence_intervals_interface() + Persistence_intervals_interface(const char* , unsigned ) + Persistence_intervals_interface(const vector[pair[double, double]] intervals) + pair[double, double] get_x_range_interface() const + pair[double, double] get_y_range_interface() const + vector[double] length_of_dominant_intervals_interface(size_t where_to_cut) const + vector[pair[double, double] ] dominant_intervals_interface(size_t where_to_cut) const + vector[size_t] histogram_of_lengths_interface(size_t number_of_bins ) const + vector[size_t] cumulative_histogram_of_lengths_interface(size_t number_of_bins) const + vector[double] characteristic_function_of_diagram_interface(double x_min, double x_max, size_t number_of_bins) const + vector[double] cumulative_characteristic_function_of_diagram_interface(double x_min, double x_max, size_t number_of_bins) const + vector[pair[double, size_t] ] compute_persistent_betti_numbers_interface() const + double project_to_R_interface(int number_of_function) const + size_t number_of_projections_to_R_interface() const + vector[double] vectorize_interface(int number_of_function) const + size_t number_of_vectorize_functions_interface() const + +""" +make sure that here we call the functions from the intermediate .h file, with dummy names, so that later below we can use the same names of the functions as in C++ version. +Over here I need to list all the functions that will be used in the file. So there should be a list of constructors, methors, etc. +to separate the function, use newline. Put there only C++ signature +""" + + + +#convention for python class is PersistenceIntervals instead of Persistence_intervals +#for methods it is def num_simplices(self). +cdef class PersistenceIntervals: + """ + Persistence intrvals is a standard representation of persistent homology. This file provide implementation of a number of operations on persistence diagrams. + """ + + cdef Persistence_intervals_interface * thisptr + + #do we need a fake constructor here, as in case of bitmaps?? + #We do need it so that we have a doc for python becaus ethe documentation only read from __init__, it do not read from __cinit__ + #__ means private memeber + def __init__(self, vector_of_intervals=None, dimension = None, file_with_intervals=''): + """Persistence interals is a standard representation of persistent homology. This file provide implementation of a number of operations on persistence diagrams. + + :param dimensions: A vector of birth-death pairs. + + Or + + :param Gudhi style file togethr with a dimension of birth-death pairs to consider. + """ + + + # The real cython constructor + def __cinit__(self, vector_of_intervals=None, dimension = None, file_with_intervals=''): + if (vector_of_intervals is None) and (file_with_intervals is not ''): + self.thisptr = new Persistence_intervals_interface(file_with_intervals, dimension) + elif (file_with_intervals is not '') and (vector_of_intervals is not None): + if os.path.isfile(file_with_intervals): + self.thisptr = new Persistence_intervals_interface(str.encode(file_with_intervals)) + else: + print("file " + file_with_intervals + " not found.") + else: + print("Persistence interals can be constructed from vector of birth-death pairs, vector_of_intervals or a Gudhi-style file.") + + + + def __dealloc__(self): + if self.thisptr != NULL: + del self.thisptr + + + #from here on this is my try. Do we need to specify the returned type?? + #no, we do not. + def get_x_range(self): + if self.thisptr != NULL: + return self.thisptr.get_x_range_interface() + + def get_y_range(self): + if self.thisptr != NULL: + return self.thisptr.get_y_range_interface() + + def length_of_dominant_intervals(self,where_to_cut): + if (self.thisptr != NULL) and (where_to_cut is not None): + return self.thisptr.length_of_dominant_intervals_interface(where_to_cut) + else: + if (self.thisptr != NULL): + return self.thisptr.dominant_intervals_interface(100)#default argument + + def dominant_intervals(self,where_to_cut): + if (self.thisptr != NULL) and (where_to_cut is not None): + return self.thisptr.dominant_intervals_interface(where_to_cut) + else: + if (self.thisptr != NULL): + return self.thisptr.dominant_intervals_interface(100)#default argument + + def histogram_of_lengths(self,number_of_bins): + if (self.thisptr != NULL) and (number_of_bins is not None): + return self.thisptr.histogram_of_lengths_interface(number_of_bins) + else: + if (self.thisptr != NULL): + return self.thisptr.dominant_intervals_interface(100) #default argument + + def cumulative_histogram_of_lengths(self,number_of_bins): + if (self.thisptr != NULL) and (number_of_bins is not None): + return self.thisptr.cumulative_histogram_of_lengths_interface(number_of_bins) + else: + if (self.thisptr != NULL): + return self.thisptr.cumulative_histogram_of_lengths_interface(10)#default argument + + def characteristic_function_of_diagram(self,x_min,x_max,number_of_bins): + if (self.thisptr != NULL) and ( x_min is not None ) and ( x_max is not None ) and ( number_of_bins is not None ): + return self.thisptr.characteristic_function_of_diagram_interface( x_min , x_max , number_of_bins ) + else: + if (self.thisptr != NULL) and ( x_min is not None ) and ( x_max is not None ): + return self.thisptr.characteristic_function_of_diagram_interface( x_min , x_max ,10 ) #default argument + + def cumulative_characteristic_function_of_diagram(self,x_min,x_max,number_of_bins): + if (self.thisptr != NULL) and ( x_min is not None ) and ( x_max is not None ) and ( number_of_bins is not None ): + return self.thisptr.cumulative_characteristic_function_of_diagram_interface( x_min , x_max , number_of_bins ) + else: + if (self.thisptr != NULL ) and ( x_min is not None ) and ( x_max is not None ): + return self.thisptr.cumulative_characteristic_function_of_diagram_interface( x_min , x_max , 10) #default argument + + def compute_persistent_betti_numbers(self): + if self.thisptr != NULL: + return self.thisptr.compute_persistent_betti_numbers_interface() + + def project_to_R(self,number_of_function): + if (self.thisptr != NULL) and (number_of_function is not None): + return self.thisptr.project_to_R_interface(number_of_function) + + def number_of_projections_to_R(self): + if self.thisptr != NULL: + return self.thisptr.number_of_projections_to_R_interface() + + def vectorize(self,number_of_function): + if (self.thisptr != NULL) and ( number_of_function is not None ): + return self.thisptr.vectorize_interface(number_of_function) + + def number_of_vectorize_functions(self): + if (self.thisptr != NULL): + return self.thisptr.number_of_vectorize_functions_interface() + + + diff --git a/src/cython/gudhi.pyx.in b/src/cython/gudhi.pyx.in index 6bb6dce9..62b593e1 100644 --- a/src/cython/gudhi.pyx.in +++ b/src/cython/gudhi.pyx.in @@ -32,7 +32,7 @@ include "cython/periodic_cubical_complex.pyx" include "cython/persistence_graphical_tools.py" include "cython/witness_complex.pyx" include "cython/strong_witness_complex.pyx" -include "cython/persistence_representations_diagrams.pyx" +include "cython/persistence_representations_intervals.pyx" @GUDHI_CYTHON_ALPHA_COMPLEX@ @GUDHI_CYTHON_EUCLIDEAN_WITNESS_COMPLEX@ @GUDHI_CYTHON_SUBSAMPLING@ diff --git a/src/cython/include/persistence_representations_diagrams.h b/src/cython/include/persistence_representations_diagrams.h deleted file mode 100644 index aed2304c..00000000 --- a/src/cython/include/persistence_representations_diagrams.h +++ /dev/null @@ -1,123 +0,0 @@ -/* 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): Pawel Dlotko - * - * Copyright (C) 2017 Swansea University - * - * 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 . - */ - -#ifndef INCLUDE_PERSISTENCE_REPRESENTATIONS_DIAGRAMS_ -#define INCLUDE_PERSISTENCE_REPRESENTATIONS_DIAGRAMS_ - -#include - -#include -#include -#include - -namespace Gudhi { - -//But if we want to have the same names of classes in C++ and cyton side we ned this interface, because othervise we will have a name conflict. And we want to have the same names on the -//C++ and python side for various reasonc (clarity, documentantions etc.). -//If the C++ class we inherid from are template class, we are inherid from concretization, for instance Persistence_intervals. -//Also in this class, we create an interface functions that will be used in the python side. That will allow to have the same name of the functions in the C++ and python side. - -namespace Persistence_representations { - -class Persistence_intervals_interface : public Persistence_intervals -{ - public: - Persistence_intervals_interface(const char* filename, unsigned dimension = std::numeric_limits::max()) - : Persistence_intervals(filename, dimension) { - } - - Persistence_intervals_interface(const std::vector >& intervals) - : Persistence_intervals(intervals) { - } - - std::pair get_x_range_interface() const - { - return this->get_x_range(); - } - - std::pair get_y_range_interface() const - { - return this->get_y_range(); - } - - std::vector length_of_dominant_intervals_interface(size_t where_to_cut = 100) const - { - return this->length_of_dominant_intervals(where_to_cut); - } - - std::vector > dominant_intervals_interface(size_t where_to_cut = 100) const - { - return this->dominant_intervals(where_to_cut); - } - - std::vector histogram_of_lengths_interface(size_t number_of_bins = 10) const - { - return this->histogram_of_lengths(number_of_bins); - } - - std::vector cumulative_histogram_of_lengths_interface(size_t number_of_bins = 10) const - { - return this->cumulative_histogram_of_lengths(number_of_bins); - } - - std::vector characteristic_function_of_diagram_interface(double x_min, double x_max, size_t number_of_bins = 10) const - { - return this->characteristic_function_of_diagram(x_min,x_max,number_of_bins); - } - - std::vector cumulative_characteristic_function_of_diagram_interface(double x_min, double x_max, size_t number_of_bins = 10) const - { - return this->cumulative_characteristic_function_of_diagram(x_min,x_max,number_of_bins); - } - - std::vector > compute_persistent_betti_numbers_interface() const - { - return this->compute_persistent_betti_numbers(); - } - - double project_to_R_interface(int number_of_function) const - { - return this->project_to_R(number_of_function); - } - - size_t number_of_projections_to_R_interface() const - { - return this->number_of_projections_to_R(); - } - - std::vector vectorize_interface(int number_of_function) const - { - return this->vectorize(number_of_function); - } - - size_t number_of_vectorize_functions_interface() const - { - return this->number_of_vectorize_functions(); - } -}; - -} // namespace Persistence_representations - -} // namespace Gudhi - -#endif // INCLUDE_PERSISTENCE_REPRESENTATIONS_DIAGRAMS_ - diff --git a/src/cython/include/persistence_representations_intervals.h b/src/cython/include/persistence_representations_intervals.h new file mode 100644 index 00000000..eb440f1a --- /dev/null +++ b/src/cython/include/persistence_representations_intervals.h @@ -0,0 +1,123 @@ +/* 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): Pawel Dlotko + * + * Copyright (C) 2017 Swansea University + * + * 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 . + */ + +#ifndef INCLUDE_PERSISTENCE_REPRESENTATIONS_INTERVALS_ +#define INCLUDE_PERSISTENCE_REPRESENTATIONS_INTERVALS_ + +#include + +#include +#include +#include + +namespace Gudhi { + +//But if we want to have the same names of classes in C++ and cyton side we ned this interface, because othervise we will have a name conflict. And we want to have the same names on the +//C++ and python side for various reasonc (clarity, documentantions etc.). +//If the C++ class we inherid from are template class, we are inherid from concretization, for instance Persistence_intervals. +//Also in this class, we create an interface functions that will be used in the python side. That will allow to have the same name of the functions in the C++ and python side. + +namespace Persistence_representations { + +class Persistence_intervals_interface : public Persistence_intervals +{ + public: + Persistence_intervals_interface(const char* filename, unsigned dimension = std::numeric_limits::max()) + : Persistence_intervals(filename, dimension) { + } + + Persistence_intervals_interface(const std::vector >& intervals) + : Persistence_intervals(intervals) { + } + + std::pair get_x_range_interface() const + { + return this->get_x_range(); + } + + std::pair get_y_range_interface() const + { + return this->get_y_range(); + } + + std::vector length_of_dominant_intervals_interface(size_t where_to_cut = 100) const + { + return this->length_of_dominant_intervals(where_to_cut); + } + + std::vector > dominant_intervals_interface(size_t where_to_cut = 100) const + { + return this->dominant_intervals(where_to_cut); + } + + std::vector histogram_of_lengths_interface(size_t number_of_bins = 10) const + { + return this->histogram_of_lengths(number_of_bins); + } + + std::vector cumulative_histogram_of_lengths_interface(size_t number_of_bins = 10) const + { + return this->cumulative_histogram_of_lengths(number_of_bins); + } + + std::vector characteristic_function_of_diagram_interface(double x_min, double x_max, size_t number_of_bins = 10) const + { + return this->characteristic_function_of_diagram(x_min,x_max,number_of_bins); + } + + std::vector cumulative_characteristic_function_of_diagram_interface(double x_min, double x_max, size_t number_of_bins = 10) const + { + return this->cumulative_characteristic_function_of_diagram(x_min,x_max,number_of_bins); + } + + std::vector > compute_persistent_betti_numbers_interface() const + { + return this->compute_persistent_betti_numbers(); + } + + double project_to_R_interface(int number_of_function) const + { + return this->project_to_R(number_of_function); + } + + size_t number_of_projections_to_R_interface() const + { + return this->number_of_projections_to_R(); + } + + std::vector vectorize_interface(int number_of_function) const + { + return this->vectorize(number_of_function); + } + + size_t number_of_vectorize_functions_interface() const + { + return this->number_of_vectorize_functions(); + } +}; + +} // namespace Persistence_representations + +} // namespace Gudhi + +#endif // INCLUDE_PERSISTENCE_REPRESENTATIONS_DIAGRAMS_ + -- cgit v1.2.3