From: <gea...@us...> - 2009-05-18 14:57:28
|
Revision: 348 http://mypyspace.svn.sourceforge.net/mypyspace/?rev=348&view=rev Author: gearmonkey Date: 2009-05-18 14:57:26 +0000 (Mon, 18 May 2009) Log Message: ----------- adjusted the formating of the edge dump slightly. Added a graph with some initial weights (~27k of 1.5M edges) the rest of the edges are weighted at the median of the edges with actual weight, so as to continue neutrality. I'm currently adjusting the way the track is specified in the 'track' attribute to have full paths to location on the GDS cluster and will update when that's finished. Modified Paths: -------------- graphRDF/branches/songsAsNodes/graphRDF.py Added Paths: ----------- graphRDF/branches/songsAsNodes/partiallyWeightedAdjustedSongGraph.graphmlz Modified: graphRDF/branches/songsAsNodes/graphRDF.py =================================================================== --- graphRDF/branches/songsAsNodes/graphRDF.py 2009-05-17 15:34:06 UTC (rev 347) +++ graphRDF/branches/songsAsNodes/graphRDF.py 2009-05-18 14:57:26 UTC (rev 348) @@ -331,10 +331,10 @@ """Writes out (text) the edgelist of the selected graph (G by default) as tab delimited pairs - source0\ttarget0 - source1\ttarget1 + edgeNum\tsource0\ttarget0 + edgeNum\tsource1\ttarget1 ... - sourceN\ttargetN + edgeNum\tsourceN\ttargetN If the graph selected is G, each node is represented as it's myspace artist ID. If the selected graph @@ -381,7 +381,7 @@ else: sourceText = str(graphToPrint.vs[edge.source]['track'].lstrip(prefix)) targetText = str(graphToPrint.vs[edge.target]['track'].lstrip(prefix)) - fH.write(sourceText + '\t' + targetText + '\n') + fH.write(str(edge.index) + '\t' + sourceText + '\t' + targetText + '\n') fH.flush() return @@ -398,12 +398,6 @@ self.S_shortestpaths_unweighted = [[]]*len(self.S.vs) try: return self.S_shortestpaths_unweighted[src][dst] - # try: - # if not self.S_shortestpaths_unweighted[src][dst] == []: - # return self.S_shortestpaths_unweighted[src][dst] - # else: - # self.S_shortestpaths_unweighted[src] = self.S.get_shortest_paths(src) - # return self.S_shortestpaths_unweighted[src][dst] except IndexError: self.S_shortestpaths_unweighted[src] = self.S.get_shortest_paths(src) return self.S_shortestpaths_unweighted[src][dst] Added: graphRDF/branches/songsAsNodes/partiallyWeightedAdjustedSongGraph.graphmlz =================================================================== (Binary files differ) Property changes on: graphRDF/branches/songsAsNodes/partiallyWeightedAdjustedSongGraph.graphmlz ___________________________________________________________________ Added: svn:mime-type + application/octet-stream This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |