最近离散学了哈斯图,网上关于哈斯图的东西还挺少的,其实我觉得哈斯图主要就是表示偏序关系的,下面是我写的哈斯图编程的伪代码~
关系R所在的集合为B集合。
For(int i= 1;集合B不为空集;i++)
将以B中任何点为起点通过关系R都找不到的点从B 中取出,并将以这些点为起点的关系从R中移除;
关系R所在的集合为B集合。
For(int i= 1;集合B不为空集;i++)
将以B中任何点为起点通过关系R都找不到的点从B 中取出,并将以这些点为起点的关系从R中移除;
按照循环所分的层次通过关系R将分层的点依次连接。