aitool.data_structure.graph package¶
Submodules¶
aitool.data_structure.graph.chain_forward_stars module¶
-
class
aitool.data_structure.graph.chain_forward_stars.ChainForwardStars¶ Bases:
object-
add_triple(node_begin_name: Any, node_end_name: Any, relation_name: Any, node_begin_info: Any = None, node_end_info: Any = None, relation_info: Any = None) → None¶
-
built(data: list) → None¶
-
clear()¶
-
get_node_index(node_name: int, info: Any = None) → int¶
-
print() → str¶
-
-
class
aitool.data_structure.graph.chain_forward_stars.Edge(end: int, pre: int, name: Any = None, info: Any = None)¶ Bases:
object
-
class
aitool.data_structure.graph.chain_forward_stars.Node(name: Any, info: Any = None)¶ Bases:
objectThe Node in the graph must have a name and can have an additional info of any structure. The name and info must support the = operation. name is not the identifier of Node. 图谱中的节点Node必须有一个nam,并可以带有一个额外的任意结构的info。 name和info必须支持=操作。 name并不是Node的标识符。
-
class
aitool.data_structure.graph.chain_forward_stars.Piece(node_begin: Any, node_end: Any, relation: Any, node_begin_info: Any = None, node_end_info: Any = None, relation_info: Any = None)¶ Bases:
object
-
aitool.data_structure.graph.chain_forward_stars.reform_data(data: List[Any]) → List[aitool.data_structure.graph.chain_forward_stars.Piece]¶