Varga's transformation

Subject:        Re: [SOCNET] need for a procedure
From:           "varga attila" <tdskusz@yahoo.com>
Date:           Fri, August 28, 2009 09:54
To:     vladimir.batagelj@fmf.uni-lj.si

Dear Vladimir Batagelj!
I hope this expression will be understendable!
  node "i" and "j" have values "m" and "n", edge "ij" has value "k" 
I wan't to compute these quantities.
These have to be valued lines i.e. valued arcs:
  k/m=ij
  k/n=ji

Varga Attila

Thanks to Andrej who added to Pajek operations

Net/Transform/Remove/Triangle

it is now possible to make this transformation in Pajek.

output   operation
Ndir   : Net/Transform/Edges -> Arcs [Yes]
U      : Net/Transform/Remove/Triangle/Lower [Yes]
       : select Ndir
L      : Net/Transform/Remove/Triangle/Upper [No]
q=1/p  : Vector/Transform/Invert
       : select U
q#U    : Operations/Vector/Vector#Network/Output
       : select L
q#L    : Operations/Vector/Vector#Network/Input
       : select q#U as second network
U+L    : Nets/Union of lines
       : Net/Transform/Remove/Multiple Lines/Min Value [No]
       : dispose auxiliary data
This sequence of commands is stored also in the macro Varga.mcr and you can make the transformation simply by selecting the network and vector and then running the macro varga.zip

Macro/Play  [Varga.mcr]

input : Valued network w[i,j], vector p[i] with nonzero values
output: Directed network v[i,j] with values v[i,j] = w[i,j]/p[i], i<j and v[i,j] = w[i,j]/p[j], j<i

For example, for the input data (vargaTest.net and vargaTest.vec)

        w     1  2  3  4      p
------------------------     ---
 v1     1.    6  0  5 10      2
 v2     2.    0  0  1  4      3
 v3     3.    5  1  3  8      1
 v4     4.   10  4  8  0      4

we get
        v       1    2    3    4
--------------------------------
 v1     1.   3.00 0.00 2.50 5.00
 v2     2.   0.00 0.00 0.33 1.33
 v3     3.   2.50 0.33 3.00 8.00
 v4     4.   5.00 1.33 8.00 0.00
The macro varga was prepared by Vladimir Batagelj on 6. September 2009.

pajek/faq/varga.txt · Last modified: 2015/07/29 03:52 by vlado
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki