pseudomanifold / aleph Goto Github PK
View Code? Open in Web Editor NEWA library for exploring persistent homology
Home Page: https://pseudomanifold.github.io/Aleph/
License: MIT License
A library for exploring persistent homology
Home Page: https://pseudomanifold.github.io/Aleph/
License: MIT License
Distance functors are part of the wrong namespace. They should be in aleph::geometry::distances
, as indicated by the folder structure, but they are actually in aleph::distances
. This needs to be changed.
The class does not necessarily have to be templated with respect to the required simplicial complex. It should be possible to use templates only for the main operator, i.e operator()(...)
and detect the required types here. This would simplify the usage of this class.
submanifold was a cool github identifier.
The example does not compile if FLANN
is not present. This should be rectified, as the choice in neighbourhood calculation is not really important here.
Aleph is still missing package files that facilitate installing the library and its examples. It would be nice to have packages for some distributions. This issue shows the status of this endeavour.
This also pertains to the namespaces, of course. The geometry
assignment makes more sense, I guess, because it refers to how these complexes are being generated.
It makes sense to keep HDF5 configurable for users because they do not necessarily want to use the library just for obtaining a corresponding simplicial complex reader.
Ideally, we should do the following:
HDF5_FOUND
variableAlternatively, we could try to detect proper installations by attempting to compile a snippet. It might be possible to use CHECK_CXX_SOURCE_COMPILES
for this purpose.
Currently, I/O for boundary matrices is solved in a header below the boundaryMatrices
directory. Moving this to io
is more consistent in my opinion.
Require at least the following ones for persistence:
Not quite sure whether the CMakeLists.txt
need to contain specific INCLUDE_DIRECTORIES
specifications. Also, they are lacking installation targets---this needs to be rectified before Aleph can make a release.
Building from source from github is not working due to the error below:
make[2]: *** [tests/CMakeFiles/test_spine.dir/build.make:63: tests/CMakeFiles/test_spine.dir/test_spine.cc.o] Error 1
I have verified this on 3 different machines, using the standard make
commands after cloning with git, or using the provided PKGBUILD / yay
/ packer / pacaur, etc.
It does not make sense for these calculations to be in a top-level folder. I would rather have them assigned to the folder that also includes the persistence diagrams.
Similar to the reader class for edge lists, this reader should handle PLY files. This gives us the opportunity to specify arbitrary simplicial complex implementations that may be stored in there.
When converting a simplicial complex to an adjacency matrix for faster clique enumeration, I am assuming that vertex indices start at zero. This is not always the case and could easily be rectified by adding an additional map.
The data assignment method of the Rips expander class assumes that vertices have zero-based indices. This does not have to be the case for generic simplicial complexes.
In the original formulation of intersection homology, the strata need to satisfy
The class is really slow, even for small graphs with less than 1000 nodes. Need to do a proper profiling run here.
In the persistence_indicator_function
tool, unpaired points are not yet handled correctly but simply removed. This should be changed.
This is not done in other packages as well—mostly because handling unpaired indices is not a trivial problem. For now, they will be silently ignored in the pairing calculation.
The simplicial complex class automatically inserts faces of the simplices in order to retain validity. Maybe this is not the smartest move because one might want to check in a partial list of simplices without creating their faces.
Need to check at which points this may cause a problem.
The tool crashes for empty inputs. Moreover, it is missing usage information, even though some parameters are configurable.
Raise an exception and stop building the Python bindings when this happens because it will seriously screw up the build process.
Compiling the python binding with g++-4.8 successfully links, yet results in an unusable binary with undefined symbols.
Compiling with g++-6 works fine though.
Error when loading:
>>> import aleph as al
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: /home/hornm/Projects/DeepTDA/Aleph/build/bindings/python/aleph/aleph.so: undefined symbol: _ZNSt20regex_token_iteratorIN9__gnu_cxx17__normal_iteratorIPKcSsEEcSt12regex_traitsIcEEC1ES4_S4_RKSt11basic_regexIcS6_EiSt6bitsetILm11EE
-- The CXX compiler identification is GNU 4.8.4
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- CMAKE_ROOT: /usr/share/cmake-2.8
-- CMAKE_SYSTEM_VERSION: 3.13.0-133-generic
-- Performing Test ALEPH_HAVE_FLAG_Wall
-- Performing Test ALEPH_HAVE_FLAG_Wall - Success
-- Performing Test ALEPH_HAVE_FLAG_Wconversion
-- Performing Test ALEPH_HAVE_FLAG_Wconversion - Success
-- Performing Test ALEPH_HAVE_FLAG_Wextra
-- Performing Test ALEPH_HAVE_FLAG_Wextra - Success
-- Performing Test ALEPH_HAVE_FLAG_Wnon-virtual-dtor
-- Performing Test ALEPH_HAVE_FLAG_Wnon-virtual-dtor - Success
-- Performing Test ALEPH_HAVE_FLAG_Wold-style-cast
-- Performing Test ALEPH_HAVE_FLAG_Wold-style-cast - Success
-- Performing Test ALEPH_HAVE_FLAG_Woverloaded-virtual
-- Performing Test ALEPH_HAVE_FLAG_Woverloaded-virtual - Success
-- Performing Test ALEPH_HAVE_FLAG_Wself-init
-- Performing Test ALEPH_HAVE_FLAG_Wself-init - Failed
-- Performing Test ALEPH_HAVE_FLAG_Wunsafe-loop-optimization
-- Performing Test ALEPH_HAVE_FLAG_Wunsafe-loop-optimization - Failed
-- Performing Test ALEPH_HAVE_FLAG_pedantic
-- Performing Test ALEPH_HAVE_FLAG_pedantic - Success
-- Boost version: 1.67.0
-- Try OpenMP CXX flag = [-fopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Success
-- Found OpenMP: -fopenmp
-- Could NOT find FLANN (missing: FLANN_INCLUDE_DIR FLANN_LIBRARY)
-- Found HDF5: HDF5_hdf5_cpp_LIBRARY-NOTFOUND;/usr/lib/x86_64-linux-gnu/libhdf5.so;/usr/lib/x86_64-linux-gnu/libpthread.so;/usr/lib/x86_64-linux-gnu/libz.so;/usr/lib/x86_64-linux-gnu/libdl.so;/usr/lib/x86_64-linux-gnu/libm.so
CMake Warning at CMakeLists.txt:116 (MESSAGE):
One of the required HDF5 C++ libraries was not found
but the module returned HDF5_FOUND. This indicates a broken installation.
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.26")
-- checking for one of the modules 'RapidJSON'
-- checking for one of the modules 'eigen3'
-- Found PythonInterp: /local0/software/python/python3_bleeding_edge/bin/python3 (found suitable version "3.6.4", minimum required is "3")
-- Found PythonLibs: /local0/software/python/python3_bleeding_edge/lib (found suitable version "3.6.4", minimum required is "3")
CMake Warning at CMakeLists.txt:150 (FIND_PACKAGE):
By not providing "Findtinyxml2.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "tinyxml2",
but CMake did not find one.
Could not find a package configuration file provided by "tinyxml2" with any
of the following names:
tinyxml2Config.cmake
tinyxml2-config.cmake
Add the installation prefix of "tinyxml2" to CMAKE_PREFIX_PATH or set
"tinyxml2_DIR" to a directory containing one of the above files. If
"tinyxml2" provides a separate development package or SDK, be sure it has
been installed.
-- Found PYBIND11: X/pybind11/include
-- Building tools
-- Performing Test ALEPH_HAVE_FLAG_O3
-- Performing Test ALEPH_HAVE_FLAG_O3 - Success
-- Building examples
-- Performing Test ALEPH_HAVE_FLAG_Og
-- Performing Test ALEPH_HAVE_FLAG_Og - Success
-- Performing Test ALEPH_HAVE_FLAG_g
-- Performing Test ALEPH_HAVE_FLAG_g - Success
-- Performing Test ALEPH_HAVE_FLAG_Werror
-- Performing Test ALEPH_HAVE_FLAG_Werror - Success
-- Configuring done
-- Generating done
-- Build files have been written to: X/Aleph/build
aleph[0]> ldd aleph.so
linux-vdso.so.1 => (0x00007ffd5acca000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f558b32f000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f558b029000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f558ae12000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f558aa49000)
/lib64/ld-linux-x86-64.so.2 (0x00007f558bbbc000)
aleph[0]> objdump -p aleph.so
aleph.so: file format elf64-x86-64
Program Header:
LOAD off 0x0000000000000000 vaddr 0x0000000000000000 paddr 0x0000000000000000 align 2**21
filesz 0x000000000036654b memsz 0x000000000036654b flags r-x
LOAD off 0x0000000000366d48 vaddr 0x0000000000566d48 paddr 0x0000000000566d48 align 2**21
filesz 0x0000000000012428 memsz 0x00000000000125c0 flags rw-
DYNAMIC off 0x00000000003688f0 vaddr 0x00000000005688f0 paddr 0x00000000005688f0 align 2**3
filesz 0x0000000000000200 memsz 0x0000000000000200 flags rw-
NOTE off 0x00000000000001c8 vaddr 0x00000000000001c8 paddr 0x00000000000001c8 align 2**2
filesz 0x0000000000000024 memsz 0x0000000000000024 flags r--
EH_FRAME off 0x00000000002e98a8 vaddr 0x00000000002e98a8 paddr 0x00000000002e98a8 align 2**2
filesz 0x00000000000166a4 memsz 0x00000000000166a4 flags r--
STACK off 0x0000000000000000 vaddr 0x0000000000000000 paddr 0x0000000000000000 align 2**4
filesz 0x0000000000000000 memsz 0x0000000000000000 flags rw-
RELRO off 0x0000000000366d48 vaddr 0x0000000000566d48 paddr 0x0000000000566d48 align 2**0
filesz 0x00000000000022b8 memsz 0x00000000000022b8 flags r--
Dynamic Section:
NEEDED libstdc++.so.6
NEEDED libm.so.6
NEEDED libgcc_s.so.1
NEEDED libc.so.6
SONAME aleph.so
INIT 0x00000000001d0fe0
FINI 0x00000000002e5820
INIT_ARRAY 0x0000000000566d48
INIT_ARRAYSZ 0x0000000000000010
FINI_ARRAY 0x0000000000566d58
FINI_ARRAYSZ 0x0000000000000008
GNU_HASH 0x00000000000001f0
STRTAB 0x0000000000056a28
SYMTAB 0x0000000000014cb0
STRSZ 0x00000000001409e4
SYMENT 0x0000000000000018
PLTGOT 0x0000000000569000
PLTRELSZ 0x0000000000030180
PLTREL 0x0000000000000007
JMPREL 0x00000000001a0e60
RELA 0x000000000019cd08
RELASZ 0x0000000000004158
RELAENT 0x0000000000000018
VERNEED 0x000000000019cbd8
VERNEEDNUM 0x0000000000000004
VERSYM 0x000000000019740c
RELACOUNT 0x0000000000000080
Version References:
required from libgcc_s.so.1:
0x0b792650 0x00 16 GCC_3.0
required from libm.so.6:
0x09691a75 0x00 12 GLIBC_2.2.5
required from libc.so.6:
0x0d696914 0x00 14 GLIBC_2.4
0x06969194 0x00 13 GLIBC_2.14
0x09691a75 0x00 04 GLIBC_2.2.5
required from libstdc++.so.6:
0x0297f861 0x00 15 GLIBCXX_3.4.11
0x0297f868 0x00 11 GLIBCXX_3.4.18
0x02297f85 0x00 10 GLIBCXX_3.4.5
0x0297f863 0x00 09 GLIBCXX_3.4.13
0x0297f864 0x00 08 GLIBCXX_3.4.14
0x0bafd173 0x00 07 CXXABI_1.3.3
0x0bafd175 0x00 06 CXXABI_1.3.5
0x0297f865 0x00 05 GLIBCXX_3.4.15
0x056bafd3 0x00 03 CXXABI_1.3
0x08922974 0x00 02 GLIBCXX_3.4
It should be possible to specified a dedicated data type for the output of the simplicial complex that arises from Vietoris--Rips expansion. At present, the output type is automatically determined from the
nearest neighbour wrapper, but it should be possible to perform a conversion after the expansion by employing a similar interface.
Hello!
Thank you for this nice repository. I cannot however seem to get it to work.
I have done the following.
$ mkdir build
$ cd build
$ cmake ../
$ make
$ make test # Passes all tests
$ cd build/bindings/python/aleph
$ python3 setup.py install
However, starting python, it does not seem to work.
$ python3
Python 3.8.5 (default, Jul 21 2020, 10:48:26)
[Clang 11.0.3 (clang-1103.0.32.62)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import aleph
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/.../venv/lib/python3.8/site-packages/aleph/__init__.py", line 1, in <module>
from .aleph import *
ModuleNotFoundError: No module named 'aleph.aleph'
Running ccmake .
in the build/
dir gives me:
BUILD_EXAMPLES ON
BUILD_PYTHON_BINDINGS ON
BUILD_TOOLS ON
Boost_INCLUDE_DIR /usr/local/include
CMAKE_BUILD_TYPE
CMAKE_EXECUTABLE_FORMAT MACHO
CMAKE_INSTALL_PREFIX /usr/local
CMAKE_OSX_ARCHITECTURES
CMAKE_OSX_DEPLOYMENT_TARGET
CMAKE_OSX_SYSROOT /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk
FLANN_DIR
FLANN_INCLUDE_DIR FLANN_INCLUDE_DIR-NOTFOUND
FLANN_LIBRARY FLANN_LIBRARY-NOTFOUND
HDF5_DIR HDF5_DIR-NOTFOUND
PYBIND11_DIR
PYBIND11_INCLUDE_DIR PYBIND11_INCLUDE_DIR-NOTFOUND
tinyxml2_DIR tinyxml2_DIR-NOTFOUND
Would you perhaps know what the problem is? I suspect it has something to do with PYBIND11
, but I can't seem to get it to work. I have pybind11 installed.
Thank you in advance! 😄
Best,
The rejection sampling procedure should yield exactly the desired number of points. Currently, it performs early stopping. This does not follow the principle of least surprise.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.