Skip to main content

RDGC Data Generator for Contests

Release Last Commit github PyPI sata-license

GitHub Issues or Pull Requests GitHub Downloads Stars Forks

由于我现在常用的数据生成器在 API 设计上令人迷惑,我决定自己编写一个生成器。

features

目前计划支持的特性:

  • 生成随机图
    • 随机图
    • 空图(null graph)
    • 完全图(complete graph)
    • 竞赛图(tournament graph)
    • 随机树(随机父亲)
    • 随机树(随机连边)
    • 二叉树(binary tree)
    • 链图(chain graph)
    • 菊花图(star graph)
    • 圈图(cycle graph)
    • 轮图(wheel graph)
    • 从度数序列随机生成图(蒙特卡洛方法)
    • 生成 $k$-正则图( $k$-regular Graph)
    • 生成网格图
    • 将多个图组合在一起
  • 生成特定类型的数字
    • 支持从范围中随机选择质数。
  • 生成特定类型的数字序列
    • 生成给定递推函数的序列(递归实现)
  • 调用 std 生成 ans 文件
  • 杂项
    • 从命令行参数获取随机种子
    • 批量将 CRLF 格式转换为 LF 格式

PyPI

项目上传了 PyPI,因此你可以使用:

pip install rdgc

来下载最新版。

项目也将同时上传到 Test PyPI,因此也可以:

pip install -i https://test.pypi.org/simple/ rdgc

当然,后者不是推荐行为。

Semantic Versioning

原则上,我是支持 语义化版本 的,但是由于现在项目随时可能出现 Bug 和 idea,并可能由于使 API 更可读而重构,因此将项目版本号维持在 0.x.x 以说明处于快速开发阶段。

计划在完成大部分 idea 后进行一次重构并将版本号改为 1.x.x。

目前尽量遵循以下规范:

  • 若引入了重要的数据生成 API(被记录在 README 文件),则将次版本号递增;
  • 若加入了小的 API 或 Bug 修复,将修订号递增。

当然,暂时更可能看我心情。

License

项目没有额外声明的部分使用 SATA 许可证,如果你认为我的项目有用,请考虑在 Github 为我点赞。

项目的 API 设计参考了 CYaRon,如果有人认为我需要为此修改许可证,请联系我;后者的推荐方式是在 issue 中说明。

Pylint

项目使用 Pylint 检查 Python 语法。

全局禁用的检查包括:

  • unnecessary-lambda-assignment (C3001)
  • duplicate-code (R0801)
  • too-many-public-methods (R0904)
  • too-many-return-statements (R0911)
  • too-many-arguments (R0913)
  • too-many-locals (R0914)
  • keyword-arg-before-vararg (W1113)

在测试脚本中禁用了所有出现的警告,包括但不限于注释缺失。

在项目主文件中禁用的警告使用具体名称而非代码。

Metadata

Release files for rdgc 0.7.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rdgc 0.7.0
File Size Uploaded Provenance Actions
rdgc-0.7.0.tar.gz 19.5 kB Without provenance Details for rdgc-0.7.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for rdgc 0.7.0
File Interpreter ABI Platform Actions
rdgc-0.7.0-py3-none-any.whl Python 3 none any Details for rdgc-0.7.0-py3-none-any.whl

Total release size: 42.0 kB

Release files / rdgc-0.7.0.tar.gz

Download URL rdgc-0.7.0.tar.gz
Size 19.5 kB
Tags Source
SHA-256 checksum
How to use checksums
d6fe0039b88f84082451f441cc3bfbbd4e29e07c1ec39b1f0ac74ad9606c466b
BLAKE2b-256 checksum
How to use checksums
36f045abc5db71698bf9c5846604c31d3f5bd873ed0276171200ac6d9e0bd7c1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / rdgc-0.7.0-py3-none-any.whl

Download URL rdgc-0.7.0-py3-none-any.whl
Size 22.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6cf0ce745f56ad8149a6ba666a579213640516157a701b6ad2689339ad550183
BLAKE2b-256 checksum
How to use checksums
7fd4a5b3d99a6684b65fef742086c0b72f3497ed9b05878a36b46536adbfe896
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Security for rdgc 0.7.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page