PyNetIM 文档 ============ 欢迎来到 PyNetIM 文档! .. toctree:: :maxdepth: 2 :caption: 目录: changelog api 简介 ---- PyNetIM 是一个用于**社交网络影响力最大化(Influence Maximization, IM)**问题的 Python 库,集成了多种经典算法与扩散模型,并提供 **Python 实现 + C++ 加速后端**,适用于算法复现、性能对比与科研实验。 功能特性 -------- * 多种经典影响力最大化算法(Heuristic / Simulation / RIS) * 多种传播模型(IC / LT / SI / SIR) * 统一的图结构封装(基于 NetworkX) * Python 可读实现 + C++ 高性能实现 * 支持蒙特卡洛扩散模拟 * 内置算法计时装饰器 快速开始 -------- .. code-block:: python import networkx as nx from pynetim.py.graph import IMGraph from pynetim.py.algorithms import DegreeDiscountAlgorithm # 创建图 g = nx.erdos_renyi_graph(100, 0.1) # 构建 IMGraph(WC 权重) graph = IMGraph(g, edge_weight_type='WC') # 运行算法 algo = DegreeDiscountAlgorithm(graph) seeds = algo.run(k=10) print(seeds) 安装 ---- .. code-block:: bash pip install pynetim 相关链接 -------- * `GitHub 仓库 `_ * `PyPI 包 `_ * `问题反馈 `_ 索引和表格 ========== * :ref:`genindex` * :ref:`modindex` * :ref:`search`