CommitNodeGridBuilder¶
- class dsviper.CommitNodeGridBuilder¶
Bases:
objectBuilds the grid layout of the commit DAG.
Note: Not directly instantiable.
- static build(commit_node: CommitNode) CommitNodeGridBuilder¶
Return a builder that lays the DAG rooted at commit_node onto a grid of rows and columns.
- column_max() int¶
Return the max index for a column.
- nodes() dict[ValueCommitId, CommitNodeGrid]¶
Return the laid-out nodes, keyed by commit.
The key is the ValueCommitId of the commit a node stands for. The root the layout starts from is in here too, under ValueCommitId.INVALID, so a database holding one commit answers two entries.
- root() CommitNodeGrid | None¶
Return the root node or None.
- row_max() int¶
Return the max index for row.