GraphHasher

class GraphHasher(val hashBuilderFactory: () -> HashBuilder)

A class that computes hash for the nodes of the graph.

Node hash depends on the node content and transitively on all the node's edges and nodes pointed by the edges.

Node hash helps detecting relevant changes in the graph. When two graphs are the same, hashes for all the corresponding nodes will be the same. When two graphs differ, node hashes will be different only for nodes that differ or which directly or indirectly point to nodes that differ.

Some nodes can have "assigned hash". For the purposes of anther node's hash, a node with assigned hash is considered changed if and only if its assigned hash changes.

Loops in the graph are allowed only if one member of a loop has an assigned hash.

Constructors

Link copied to clipboard
constructor(hashBuilderFactory: () -> HashBuilder)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Functions

Link copied to clipboard
fun hash(node: Node): ByteString

Computes hash for the given node.

Link copied to clipboard
fun setAssignedHash(node: Node, assignedHash: ByteString)

Sets assigned hash for the given node.