Skip to content

No draw when represent node with int type #10

@eggplantisme

Description

@eggplantisme

When I try to draw a hypergraph with int type, use draw() to visualize it, it will render no hypergraph:

hg = HypergraphDB()

# 添加社交网络数据
hg.add_v(1, {"name": "Alice", "age": 30, "city": "北京"})
hg.add_v(2, {"name": "Bob", "age": 24, "city": "上海"})
hg.add_v(3, {"name": "Charlie", "age": 28, "city": "深圳"})
hg.add_v(4, {"name": "David", "age": 35, "city": "广州"})


# 二元关系
hg.add_e((1, 2), {"relation": "朋友", "since": "2020"})
hg.add_e((2, 3), {"relation": "同事", "company": "科技公司"})

# 群体关系(超图的威力所在!)
hg.add_e((1, 2, 3), {"relation": "学习小组", "subject": "机器学习"})
hg.add_e((1, 3, 4), {"relation": "项目团队", "project": "网页应用"})

# # 启动可视化
# hg.draw()

So for now, is the draw only support str type of nodes?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions