dabfs 0.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
dabfs-0.1/PKG-INFO ADDED
@@ -0,0 +1,3 @@
1
+ Metadata-Version: 2.1
2
+ Name: dabfs
3
+ Version: 0.1
dabfs-0.1/README.md ADDED
@@ -0,0 +1,55 @@
1
+ # DABFS
2
+
3
+ **DABFS** (Dynamic Approach with BFS) is a Python package for query-preserving graph compression. It efficiently compresses directed graphs while preserving reachability queries, enabling scalable query processing on large graphs.
4
+
5
+ ---
6
+
7
+ ## Installation
8
+
9
+ ```bash
10
+ pip install dabfs
11
+
12
+ Or, install locally from the repository:
13
+
14
+ git clone https://github.com/rsltgy/DABFS.git
15
+ ```
16
+
17
+ ## Usage
18
+ ```python
19
+ from dabfs import DABFS
20
+ # Call DABFS with your edge list file
21
+ DABFS("data/simple_graph.txt")
22
+ ```
23
+ ## Input
24
+ A text file containing the edge list of the graph.
25
+ Each row represents an edge with two columns: source_node and target_node.
26
+ Example of simple_graph.txt:
27
+ ```
28
+ 1 2
29
+ 2 3
30
+ 3 4
31
+ 4 1
32
+ 5 6
33
+ ```
34
+ ## Output
35
+ ```
36
+ After running DABFS():
37
+ 2026-04-02 13:14:27,026 - INFO - Saved compressed data output/scc_compressed.txt
38
+ 2026-04-02 13:14:27,028 - INFO - Total BFS time for finding all ancestors 0.00032329559326171875 sec
39
+ 2026-04-02 13:14:27,028 - INFO - Candidate Generated 3.1948089599609375e-05 sec
40
+ 2026-04-02 13:14:27,029 - INFO - Saved compressed data output/reachibility_query_compressed.txt
41
+ 2026-04-02 13:14:27,030 - INFO - compression ratio is 18.181818181818183 sec
42
+ ```
43
+ ## Basic Example
44
+ ```python
45
+ from dabfs import DABFS
46
+ # Compress the graph and save outputs
47
+ DABFS("data/simple_graph.txt")
48
+ ```
49
+ Using Compressed Graphs
50
+ ```python
51
+ from utils.data_reader import read_data
52
+ scc_graph = read_data("output/scc_compressed.txt")
53
+ reach_graph = read_data("output/reachability_query_compressed.txt")
54
+ ```
55
+ You can now run reachability queries directly on reachability_query_compressed.
@@ -0,0 +1,3 @@
1
+ Metadata-Version: 2.1
2
+ Name: dabfs
3
+ Version: 0.1
@@ -0,0 +1,6 @@
1
+ README.md
2
+ setup.py
3
+ dabfs.egg-info/PKG-INFO
4
+ dabfs.egg-info/SOURCES.txt
5
+ dabfs.egg-info/dependency_links.txt
6
+ dabfs.egg-info/top_level.txt
@@ -0,0 +1 @@
1
+
dabfs-0.1/setup.cfg ADDED
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
dabfs-0.1/setup.py ADDED
@@ -0,0 +1,7 @@
1
+ from setuptools import setup, find_packages
2
+
3
+ setup(
4
+ name="dabfs",
5
+ version="0.1",
6
+ packages=find_packages(),
7
+ )