docs: final long writeEdge(int edgeId, int nodeA, int nodeB, int nextEdgeA, int nextEdgeB) {
          if (edgeId < 0 || edgeId == EdgeIterator.NO_EDGE)
              throw new IllegalStateException("Cannot write edge with illegal ID:" + edgeId + "; nodeA:" + nodeA + ", nodeB:" + nodeB);
  
          long edgePointer = toPointer(edgeId);
          edges.setInt(edgePointer + E_NODEA, nodeA);
          edges.setInt(edgePointer + E_NODEB, nodeB);
          edges.setInt(edgePointer + E_LINKA, nextEdgeA);
          edges.setInt(edgePointer + E_LINKB, nextEdgeB);
          return edgePointer;
      }