Pajek help

From CCE wiki archived
Revision as of 14:45, 2 September 2011 by Michaelf (talk | contribs)
(diff) ?Older revision | view current revision (diff) | Newer revision? (diff)
Jump to: navigation, search

File formats

Pajek uses primarily three file types: .net, .clu, .vec

Network files

Network files (extension ".net") define a network, as in the following:


  • Vertices 3

1 "Doc1" 0.0 0.0 0.0 ic Green bc Brown 2 "Doc2" 0.0 0.0 0.0 ic Green bc Brown 3 "Doc3" 0.0 0.0 0.0 ic Green bc Brown

  • Arcs

1 2 3 c Green 2 3 5 c Black

  • Edges

1 3 4 c Green


This example defines 3 vertices (Doc1, Doc2 and Doc3) denoted by numbers 1, 2 and 3. The (fill) color of these nodes is Green and the border color is Brown. The initial layout location of the nodes is (0,0,0). Note that the (x,y,z) values can be changed interactively after drawing.

There are two arcs (directed edges). The first goes from node 1 (Doc1) to node 2 (Doc2) with a weight of 3 and in color Green.

There is one edgerom node 1 (Doc1) to node 3 (Doc3) of weight of 4, and is colored green.

Partition files

Partition files (extension ".clu") divide the vertices into classes, called partitions. These partitions cannot overlap, and yet must cover all the vertices. In other words, every vertex is assigned to one and only one partition. Here's an example:


  • Vertices 3

4 8 8


In this example, the three vertices are assigned to two different partitions - vertex #1 in partition #4, and the other two in partition #8 (note that the vertex numbers do not appear, but are simply inferred by ordering.

Vector files

Vector files (extension ".vec") assign a number to every vertex.

Here's an example:


  • Vertices 3

0.35 8.9 100.0


In this example, the first vertex is assigned a value of .35, the second 8.9, and the third 100.0. Again, the vertex numbers do not appear, but are simply inferred by ordering.

==


Using Pajek on a Mac

To create readable files on the mac, save in Word using output format “Text only with line breaks”. This will force the file into the required plaintext PC format (where line breaks contain both a carriage return and a newline, unlike unix which uses newline only).

Tutorial

http://iv.slis.indiana.edu/lm/lm-pajek.html