package layoutgraph

import (
	

	
	
)

func ( *Node) () bool {
	return  != nil && .isClusterVessel
}

func ( *Edge) ( *Node) Arrowhead {
	return .arrowheadTo()
}

func ( *Edge) ( *Node) bool {
	return .hasArrowTo()
}

// FixedOrigin returns the fixed-position origin inherited through a node's
// descendants. Tree placement uses it to preserve D2 position constraints.
func ( *Node) () *geo.Point {
	return .fixedOrigin()
}

// NewRequestTransaction creates a request-scoped placement transaction. Tree
// trials share the same transaction accounting and rollback semantics as the
// rest of the engine.
func ( *Graph) ( context.Context,  TransactionOptions) (*Transaction, error) {
	return .newRequestTransaction(, )
}

func ( *GraphState) ( *Node) bool {
	,  := .nodes[]
	return 
}

// AddIncidentEdgeUnchecked restores an already graph-owned edge to a node's
// incidence list. Tree preprocessing validates ownership before calling it.
func ( *Node) ( *Edge) {
	.addEdge()
}

// buildNodeToTreeGuarded derives the auxiliary node index while preserving
// graphjson's established validation order and shared decode work budget.
func ( *Graph) ( workStepper) error {
	 := make(map[*Node]*Tree)
	 := make([]*Node, 0, len(.Trees))
	for  := range .Trees {
		if  := .Step();  != nil {
			return 
		}
		 = append(, )
	}
	sortNodesByID()
	if  := .Finish();  != nil {
		return 
	}
	for ,  := range  {
		if  := .Step();  != nil {
			return 
		}
		for ,  := range .Trees[] {
			if  == nil || .Node == nil {
				return invariant.New("tree sentinel contains an incomplete root")
			}
			 := []*Tree{}
			 := make(map[*Tree]struct{})
			for  := 0;  < len(); ++ {
				if  := .Step();  != nil {
					return 
				}
				 := []
				if  == nil || .Node == nil {
					return invariant.New("tree preprocessing encountered an incomplete tree")
				}
				if ,  := [];  {
					return invariant.New("tree preprocessing encountered a repeated tree node")
				}
				[] = struct{}{}
				[.Node] = 
				for ,  := range .Children {
					if  := .Step();  != nil {
						return 
					}
					 = append(, )
				}
			}
		}
	}
	.NodeToTree = 
	return .Finish()
}