Skip to main content

A simple and fast Graph structure and PPR algorithm implementation based on Cpp&Cython.

Project description

QuickAlgo

这是一个快速算法库,旨在为LPMM(Long-term and Persistent Memory)模块提供Graph数据结构和一些复杂算法的Cpp+Cython高效实现。

目录结构

/┬- quick_algo - 项目目录  
 ├- quick_algo - 源码目录
 | ├- di_graph - 有向图实现
 | | ├- cpp - C++头文件&实现
 | | └- ...
 | ├- pagerank - PageRank算法实现
 | | ├- cpp - C++头文件&实现
 | | └- ...
 | └- ...
 ├- tests - 测试目录
 ├- build_lib.py - 构建脚本
 ├- requirements.txt - 依赖包列表
 ├- LICENSE.txt - 许可证
 ├- README.md - 本文档
 └- setup.py - Python包安装脚本

构建脚本

请在项目目录下执行build_lib.py并添加相应的任务,这将自动化构建过程。

该脚本支持以下任务:

  • --cleanup:清理构建目录和临时文件
  • --cythonize:编译Cython代码(要求依赖cython
  • --force_cythonize: 强制重新编译Cython代码(要求依赖cython
  • --build_dist:构建Python包(要求依赖setuptools
  • --build_wheel:构建Python wheel包(要求依赖setuptools, 要求C/Cpp编译环境)
  • --install:安装Python包(要求依赖setuptools, 要求C/Cpp编译环境)

安装

您可以直接使用pip install quick_algo进行安装,也可以在clone本仓库之后通过前述构建脚本于本地进行安装。

要使用构建脚本直接安装,请在项目目录下执行以下命令:

python build_lib.py --cleanup --cythonize --install

注意:请确保您已经安装了Cythonsetuptools,并且您的系统上有C/C++编译器可用。

测试

本项目的测试代码位于tests目录下,使用pytest进行测试。

在测试之前,请确保您装有以下依赖:

  • pytest:测试框架
  • networkx: 图算法库
  • numpy: 数值计算库(由networkx要求)
  • scipy: 数值计算库(由networkx要求)

要运行测试,请在项目目录下执行以下命令:

pytest ./tests

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

quick_algo-0.1.2.tar.gz (200.0 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

quick_algo-0.1.2-cp313-cp313-win_amd64.whl (316.8 kB view details)

Uploaded CPython 3.13Windows x86-64

quick_algo-0.1.2-cp312-cp312-win_amd64.whl (318.0 kB view details)

Uploaded CPython 3.12Windows x86-64

quick_algo-0.1.2-cp311-cp311-win_amd64.whl (318.1 kB view details)

Uploaded CPython 3.11Windows x86-64

quick_algo-0.1.2-cp310-cp310-win_amd64.whl (317.7 kB view details)

Uploaded CPython 3.10Windows x86-64

File details

Details for the file quick_algo-0.1.2.tar.gz.

File metadata

  • Download URL: quick_algo-0.1.2.tar.gz
  • Upload date:
  • Size: 200.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.2

File hashes

Hashes for quick_algo-0.1.2.tar.gz
Algorithm Hash digest
SHA256 c4270b92cf2d207f8b64eb0bdad3041119a6f7778a42c8dcae291375ff71c99e
MD5 2627a6219854ba91037aae6de86fd976
BLAKE2b-256 fa54db1aa2862d60fe8fcef4b5dbd343779eeb916b5a1bbdc712bfd77df0ffd4

See more details on using hashes here.

File details

Details for the file quick_algo-0.1.2-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: quick_algo-0.1.2-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 316.8 kB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.2

File hashes

Hashes for quick_algo-0.1.2-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 ea6fb8eaeacb41d110040bf74d37ccb22075ef2eacf2c1cd5d24f0537a60f84d
MD5 26a55fb845817ab391ac7e868cb0242a
BLAKE2b-256 87892d8bdeaa4688249438675223982c8d50e79fc572c3d691fb4e40298ed6e6

See more details on using hashes here.

File details

Details for the file quick_algo-0.1.2-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: quick_algo-0.1.2-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 318.0 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.2

File hashes

Hashes for quick_algo-0.1.2-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 052ff5f1efecb02ab176ee72b164552c5ea073b799211ce2426cdc841a3a48b1
MD5 9557d1ada073fced68b6d4109424dd2c
BLAKE2b-256 91966224a65924e16eef4f9f66bd961ef91f292ae5e8c2b85dff39fe68cc6506

See more details on using hashes here.

File details

Details for the file quick_algo-0.1.2-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: quick_algo-0.1.2-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 318.1 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.2

File hashes

Hashes for quick_algo-0.1.2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 a789b9e7ba83da1c19f0653c3398cb85ee46e43222a9f243ee0962c6328649c0
MD5 cfe20c40b65cc509753e8adb422861f4
BLAKE2b-256 da864cb0441afc5660520e5cc2d1ad393ec2d5c86db23c8e6561fffec18f992b

See more details on using hashes here.

File details

Details for the file quick_algo-0.1.2-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: quick_algo-0.1.2-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 317.7 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.2

File hashes

Hashes for quick_algo-0.1.2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 d6f6f8fbbf9136d7655a94102dc13dfc7901ee9480fd0b12fcd150b26a077160
MD5 c62db88f76a89dcbc940a881b7c9f580
BLAKE2b-256 90ace3c38fcf7348ade8ee2afe452dacf71cc7674b93d28773232545d9d2a316

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page