图形描述语言GraphML(4):复杂图形(嵌套,超边,端口)

本文详细介绍了GraphML语言中如何表示复杂图形结构,包括嵌套图、超边以及注册点的概念。通过示例展示了如何使用GraphML编码这些特性,以实现更精细的图形描述。
摘要由CSDN通过智能技术生成
复杂的图形可能包括嵌套,超边或注册点,这些GraphML也提供了内建的支持。

嵌套图( Nested Graph

嵌套图表现为图形的子元素本身也可能为图。比如:


用GraphML表示如下:

<? xml version="1.0" encoding="UTF-8" ?>
< graphml  xmlns ="http://graphml.graphdrawing.org/xmlns"   xmlns:xsi ="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation
="http://graphml.graphdrawing.org/xmlns http://graphml.graphdrawing.org/xmlns/1.0/graphml.xsd" >
  
< graph  id ="G"  edgedefault ="undirected" >
    
< node  id ="n0" />
    
< node  id ="n1" />
    
< node  id ="n2" />
    
< node  id ="n3" />
    
< node  id ="n4" />
    
< node  id ="n5" >
        
< graph  id ="n5:"  edgedefault ="undirected" >
          
< node  id ="n5::n0" />
          
< node  id ="n5::n1" />
          
< node  id ="n5::n2" />
          
< edge  id ="e0"  source ="n5::n0"  target ="n5::n2" />
          
< edge  id ="e1"  source ="n5::n1"  target ="n5::n2" />
        
</ graph >
    
</ node >
    
< node  id ="n6" >
        
< graph  id ="n6:"  edgedefault ="undirected" >
          
< node  id
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值