Skip to content
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

Develop #1

Open
wants to merge 18 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -128,3 +128,9 @@ dmypy.json

# Pyre type checker
.pyre/



local_testing.ipynb
.vscode/
settings.json
1,050 changes: 1,050 additions & 0 deletions Interactive Tutorial/Interactive_Tutorial_topapprox.ipynb

Large diffs are not rendered by default.

File renamed without changes.
815 changes: 815 additions & 0 deletions Interactive_Tutorial/Interactive_Tutorial_topapprox.ipynb

Large diffs are not rendered by default.

650 changes: 0 additions & 650 deletions Interactive_Tutorial_topapprox.ipynb

This file was deleted.

21,985 changes: 0 additions & 21,985 deletions Paper examples/Reproducing_paper_examples.ipynb

This file was deleted.

63,786 changes: 63,786 additions & 0 deletions Paper_examples/Reproducing_paper_examples.ipynb

Large diffs are not rendered by default.

File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file added Paper_examples/pagoda.npy
Binary file not shown.
File renamed without changes.
9 changes: 6 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
requires = ["setuptools>=42", "wheel", "pybind11>=2.5.0"]
build-backend = "setuptools.build_meta"

[project]
name = "topapprox"
version = "0.0.2"
version = "0.0.4"
authors = [
{ name="Matias de Jong van Lier", email="[email protected]" },
{ name="Shizuo Kaji", email="[email protected]"},
Expand All @@ -19,6 +19,9 @@ classifiers = [
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
]
dependencies = [
"pybind11>=2.5.0",
]

[project.urls]
Homepage = "https://github.com/mvlier/topapprox"
Expand Down
34 changes: 34 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# run
# python setup.py build_ext --inplace

from setuptools import setup, Extension, find_packages
import pybind11
from pybind11.setup_helpers import Pybind11Extension

import os
import platform

compiler = os.environ.get('CXX', 'g++')
if platform.system() == 'Darwin': # macOS
extra_compile_args = ['-std=c++11', '-mmacosx-version-min=10.9']
else:
extra_compile_args = ['-std=c++11']

ext_modules = [
Pybind11Extension(
'topapprox.link_reduce_cpp',
['topapprox/link_reduce_cpp.cpp'],
include_dirs=[pybind11.get_include()],
language='c++',
extra_compile_args = extra_compile_args + ['-O3', '-Wall', '-shared'],
),
]

setup(
name='topapprox',
author='Matias de Jong van Lier, Junyan Chu, Sebastían Elías Graiff Zurita, Shizuo Kaji',
description='A module for topological low persistence filter',
packages=find_packages(),
ext_modules=ext_modules,
zip_safe=False, # Ensure package is not installed as a zip
)
94 changes: 0 additions & 94 deletions test.py

This file was deleted.

65 changes: 65 additions & 0 deletions test_log.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@

2024-10-10, at 15:26:42
Test test_1D_simple_python took 0.00 seconds
Test test_1D_simple_numba took 1.95 seconds
Test test_1D_simple_numba2 took 0.00 seconds
Test test_1D_simple_cpp took 0.00 seconds
Test test_2D_simple_python took 0.00 seconds
Test test_2D_simple_numba took 0.41 seconds
Test test_2D_simple_numba2 took 0.00 seconds
Test test_2D_simple_cpp took 0.00 seconds
Test test_pagoda took 82.52 seconds

2024-10-10, at 14:35:17
Test test_pagoda took 79.14 seconds

2024-10-10, at 14:33:58
Test test_2D_simple_cpp took 0.00 seconds

2024-10-10, at 14:33:58
Test test_2D_simple_numba2 took 0.00 seconds

2024-10-10, at 14:33:58
Test test_2D_simple_numba took 0.42 seconds

2024-10-10, at 14:33:58
Test test_2D_simple_python took 0.00 seconds

2024-10-10, at 14:33:58
Test test_1D_simple_cpp took 0.00 seconds

2024-10-10, at 14:33:58
Test test_1D_simple_numba2 took 0.00 seconds

2024-10-10, at 14:33:58
Test test_1D_simple_numba took 1.95 seconds

2024-10-10, at 14:33:56
Test test_1D_simple_python took 0.00 seconds

2024-10-10, at 14:14:21
Test test_pagoda took 78.81 seconds

2024-10-10, at 14:13:02
Test test_2D_simple_cpp took 0.00 seconds

2024-10-10, at 14:13:02
Test test_2D_simple_numba2 took 0.00 seconds

2024-10-10, at 14:13:02
Test test_2D_simple_numba took 0.41 seconds

2024-10-10, at 14:13:01
Test test_2D_simple_python took 0.00 seconds

2024-10-10, at 14:13:01
Test test_1D_simple_cpp took 0.00 seconds

2024-10-10, at 14:13:01
Test test_1D_simple_numba2 took 0.00 seconds

2024-10-10, at 14:13:01
Test test_1D_simple_numba took 1.69 seconds

2024-10-10, at 14:13:00
Test test_1D_simple_python took 0.00 seconds
153 changes: 153 additions & 0 deletions tests/benchmark_log.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@

2024-10-20 16:55:45 - Benchmark Results:
Filtered 1-PH below threshold 0.2
from pagoda.npy with method=cpp
in 1.0693 seconds.



2024-10-20 16:55:44 - Benchmark Results:
Filtered 0-PH below threshold 0.2
from pagoda.npy with method=cpp
in 0.4753 seconds.



2024-10-20 16:55:43 - Benchmark Results:
Filtered 1-PH below threshold 0.2
from pagoda.npy with method=numba
in 1.2607 seconds.



2024-10-20 16:55:42 - Benchmark Results:
Filtered 0-PH below threshold 0.2
from pagoda.npy with method=numba
in 1.2896 seconds.



2024-10-20 16:55:40 - Benchmark Results:
Filtered 1-PH below threshold 0.2
from pagoda.npy with method=python
in 3.1409 seconds.



2024-10-20 16:55:37 - Benchmark Results:
Filtered 0-PH below threshold 0.2
from pagoda.npy with method=python
in 1.8618 seconds.



2024-10-20 16:53:51 - Benchmark Results:
Filtered 1-PH below threshold 0.2
from pagoda.npy with method=python
in 3.1500 seconds.



2024-10-20 16:53:48 - Benchmark Results:
Filtered 0-PH below threshold 0.2
from pagoda.npy with method=python
in 1.8611 seconds.



2024-10-20 16:51:56 - Benchmark Results:
Filtered 1-PH below threshold 0.2
from pagoda.npy with method=python
in 3.3071 seconds.



2024-10-20 16:51:52 - Benchmark Results:
Filtered 0-PH below threshold 0.2
from pagoda.npy with method=python
in 1.8582 seconds.



2024-10-18 11:22:12 - Benchmark Results:
Filtered 1-PH below threshold 0.2
from pagoda.npy with method=cpp
in 1.1844 seconds.



2024-10-18 11:22:11 - Benchmark Results:
Filtered 0-PH below threshold 0.2
from pagoda.npy with method=cpp
in 0.4455 seconds.



2024-10-18 11:22:10 - Benchmark Results:
Filtered 1-PH below threshold 0.2
from pagoda.npy with method=numba
in 1.2929 seconds.



2024-10-18 11:22:09 - Benchmark Results:
Filtered 0-PH below threshold 0.2
from pagoda.npy with method=numba
in 1.1587 seconds.



2024-10-18 11:22:07 - Benchmark Results:
Filtered 1-PH below threshold 0.2
from pagoda.npy with method=python
in 3.1428 seconds.



2024-10-18 11:22:04 - Benchmark Results:
Filtered 0-PH below threshold 0.2
from pagoda.npy with method=python
in 1.8629 seconds.



2024-10-15 12:35:28 - Benchmark Results:
Filtered 1-PH below threshold 0.2
from pagoda.npy with method=cpp
in 4.9423 seconds.



2024-10-15 12:35:23 - Benchmark Results:
Filtered 0-PH below threshold 0.2
from pagoda.npy with method=cpp
in 2.4064 seconds.



2024-10-15 12:35:20 - Benchmark Results:
Filtered 1-PH below threshold 0.2
from pagoda.npy with method=numba
in 5.1913 seconds.



2024-10-15 12:35:15 - Benchmark Results:
Filtered 0-PH below threshold 0.2
from pagoda.npy with method=numba
in 3.0674 seconds.



2024-10-15 12:35:11 - Benchmark Results:
Filtered 1-PH below threshold 0.2
from pagoda.npy with method=python
in 7.1421 seconds.



2024-10-15 12:35:04 - Benchmark Results:
Filtered 0-PH below threshold 0.2
from pagoda.npy with method=python
in 4.0870 seconds.

Loading