什么是二进制图?

What are Binary Graphs?

我在浏览 Apache TinkerPop 时遇到了这个术语 documentation

When modeling a graph in a computer and applying it to modern data sets and practices, the generic mathematically-oriented, binary graph is extended to support both labels and key/value properties

谷歌搜索“二叉图”returns“二叉树”的定义似乎不符合此处的上下文。

二叉图是二叉树的图形数据表示。采用下面的图形数据 (https://gremlify.com/scb244l635i),其中每个节点都可以有左或右子节点。

g.addV('node').as('1').property(single, 'data', 22).
  addV('node').as('2').property(single, 'data', 16).
  addV('root').as('3').property(single, 'data', 9).
  addV('node').as('4').property(single, 'data', 5).
  addV('node').as('5').property(single, 'data', 2).
  addV('node').as('6').property(single, 'data', 11).
  addV('node').as('7').property(single, 'data', 15).
  addV('node').as('8').property(single, 'data', 10).
  addV('node').as('9').property(single, 'data', 1).
  addV('node').as('10').property(single, 'data', 8).
  addE('left').from('1').to('2').
  addE('left').from('3').to('4').
  addE('right').from('3').to('6').
  addE('left').from('4').to('5').
  addE('right').from('4').to('10').
  addE('left').from('5').to('9').
  addE('left').from('6').to('8').
  addE('right').from('6').to('7').
  addE('right').from('7').to('1')

条件:

  1. 每个节点只能有一个父节点。
  2. 每个节点最多可以有2个子节点(左右)。