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
adjacency matrix
- 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
What about using the DL format? you can put directly a matrix there.
See http://gephi.org/users/supported-graph- ... dl-format/
See http://gephi.org/users/supported-graph- ... dl-format/
-
- 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
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
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
-
- 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
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.
-
- 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
Put it in to a pivot table in excel. x as rows, y as columns and weight as sum.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.
Copy and paste the table (transposing it when you do) so you have two tables.
Multiple them as matrices.