adjacency matrix

Get help with your data
Post Reply [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable
steffen
Posts:2
Joined:15 Oct 2010 12:31
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable
adjacency matrix

Post by steffen » 15 Oct 2010 13:49

Hej,

due to the fact that my data came from a database in form of an adjacency matrix i want to ask if someone can give me a hint to a good converter to generate an edge list from an adjacency matrix.
The nodeattributes are available in the right format to import them via the data lab with a csv-file.

best regards,
steffen

User avatar
mbastian
Gephi Architect
Posts:728
Joined:10 Dec 2009 10:11
Location:San Francisco, CA
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable

Re: adjacency matrix

Post by mbastian » 15 Oct 2010 15:17

What about using the DL format? you can put directly a matrix there.

See http://gephi.org/users/supported-graph- ... dl-format/

steffen
Posts:2
Joined:15 Oct 2010 12:31
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable

Re: adjacency matrix

Post by steffen » 01 Nov 2010 13:59

for all them, who has the same problem - here is a macro for vba.

Just select your adjacency matrix and run the macro:

Sub MatrixToListe2()
Dim AnzSpalten, AnzZeilen
Dim sh As Object, rg As Object
Dim StartZeile, z, s
Set rg = Selection
AnzSpalten = rg.Columns.Count
AnzZeilen = rg.Rows.Count
StartZeile = 1
Set sh = Sheets.Add
For z = 2 To AnzZeilen
For s = 2 To AnzSpalten
sh.Cells(StartZeile, 1) = rg.Cells(z, 1)
sh.Cells(StartZeile, 2) = rg.Cells(1, s)
sh.Cells(StartZeile, 3) = rg.Cells(z, s)
StartZeile = StartZeile + 1
Next s
Next z
End Sub


regards,
steffen

shafique
Posts:2
Joined:31 Jan 2011 08:17
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable

Re: adjacency matrix

Post by shafique » 09 Apr 2011 14:34

I have exactly the opposite problem. That is, i have pair-wise edge lists in the format "x,y,weight". I need to convert it into adjacency matrix. Could anybody give a clue about a macro/code etc. to solve this problem? I shall be grateful.

BradCA
Posts:1
Joined:23 Jul 2014 07:47
Location:Australia
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable

Re: adjacency matrix

Post by BradCA » 23 Jul 2014 07:53

shafique wrote:I have exactly the opposite problem. That is, i have pair-wise edge lists in the format "x,y,weight". I need to convert it into adjacency matrix. Could anybody give a clue about a macro/code etc. to solve this problem? I shall be grateful.
Put it in to a pivot table in excel. x as rows, y as columns and weight as sum.
Copy and paste the table (transposing it when you do) so you have two tables.
Multiple them as matrices.

Post Reply
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable