Skip to content

parsePajek

parsePajek(text): ParsedPajek

Defined in: network/pajek.ts:121

Parse a Pajek .net document into a directed-or-undirected edge list (+ optional positions).

Vertex ids are keys, as Infomap reads them: any non-negative integer up to 4294967295, 0 included, with gaps. A node is a vertex line’s id or an id a link uses (its label is then the id); the *Vertices count adds no nodes. Dense indices follow ascending id, so a file numbered 1..N puts vertex v at index v - 1, and ids gives each index’s id. % and # lines are comments in every section. A vertex or link line without valid ids throws, naming the line.

string

ParsedPajek