Expand description
Pose-graph relaxation (src/core/pose-graph.ts::PoseGraph.optimize/residual computation). A Gauss-Seidel-style
relaxation over a graph handed in as plain arrays: node positions/pinned flags plus a CSR adjacency list the
TS side builds from its Map iteration order — this module never sees string ids, only indices, so node
identity/ordering questions stay where the KV layout lives (pose-graph.ts). Alternating forward/reverse
node-visitation order matches optimize()’s odd/even iteration parity (iterations % 2 === 1).
Structs§
- Edge
- One directed edge
node -> other,otheralready resolved to a node index by the caller.other < 0is a defensive sentinel for “target node not found” (mirrorsthis.nodes.get(edge.other)returningundefinedin pose-graph.ts’soptimize()/residualloops): the edge is skipped without stopping the edge loop, exactly asif (!other) continue;does there. In practice every edge’sotheralways resolves — nodes are never removed once hydrated — but the sentinel keeps the two sides’ control flow identical rather than assuming it. - Graph
- Node