# Function buildAdjacency

- buildAdjacency(
  nodeIds: readonly string[],
  edges: readonly WeightedEdge[],
  ): AdjacencyMap

  Build an undirected adjacency map from a weighted edge list.

  Self-loops are dropped. Parallel edges between the same pair are merged by taking the maximum weight (so combined networks remain well-defined when both committee and voting edges describe the same pair).

  #### Parameters

  - nodeIds: readonly string[]

    Full node universe; nodes without edges still appear as empty maps.

  - edges: readonly WeightedEdge[]

    Weighted edges (order-independent).

  #### Returns AdjacencyMap

  Adjacency map keyed by node id.

  - Defined in utils/graphAlgorithms.ts:46