Sponsored Content
Top Forums Shell Programming and Scripting Making Connection nodes for Graph Post 302326483 by anjas on Thursday 18th of June 2009 04:42:32 AM
Old 06-18-2009
Tx for the scripts. However, I have another problem, which is related to the previous one. For example, if I have this file:

file1
aa A 3
aa B 4
aa C 5
bb X 6
bb Y 7
bb Z 8
cc O 9
cc P 10
cc Q 11
. .
. .
. .
. .

and I want to turn them into a connection nodes like this:
file2

A aa A 3 3
A aa B 3 4
A aa C 3 5
B aa C 4 5
B aa B 4 4
C aa C 5 5
X bb X 6 6
X bb Y 6 7
X bb Z 6 8
Y bb Z 7 8
Y bb Y 7 7
Z bb Z 8 8
. . .
. . .
. . .
. . .

I made this relation, to create a graph. Like before, The file could have more than 100.000 lines. Any suggestion to modify the script, or to create a new one? Tx
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

i-nodes

first off, i am new to unix so please bear with me. i was reading somewhere that if your i-nodes get critical that it can slow your network down. what are i-nodes and when do they become a critical number? this is what mine states: / (/dev/root ): 777058 blocks 569290 i-nodes... (4 Replies)
Discussion started by: djatwork
4 Replies

2. UNIX for Dummies Questions & Answers

nodes

how do you list all the nodes in unix :confused: (3 Replies)
Discussion started by: kamisi
3 Replies

3. UNIX for Advanced & Expert Users

Managing nodes???

Does anyone know something about this? I have no idea what it means and how to do it. but if anyone can give me and explanation and also point me to a website, i'd really appreciate it (5 Replies)
Discussion started by: TRUEST
5 Replies

4. Shell Programming and Scripting

Making Large Connection nodes for Graph

Hi power user, Basically, this thread is a continuation of the previous one :): https://www.unix.com/shell-programming-scripting/110650-making-connection-nodes-graph.html#post302326483 However, I'm going to explain it again. I have this following data: file1 aa A ... (3 Replies)
Discussion started by: anjas
3 Replies

5. UNIX for Advanced & Expert Users

Connection reset by peer..closing connection

Hello I'm facing the above problem while doing a performance run. I've a script which I'm launching from my windows desktop using mozilla. The script will invoke backend action on a Solaris host which in turn feeds the records to a driver located on a linux box(Cent OS). What's happening is... (1 Reply)
Discussion started by: subramanyab
1 Replies

6. Solaris

Solaris 10 ftp connection problem (connection refused, connection timed out)

Hi everyone, I am hoping anyone of you could help me in this weird problem we have in 1 of our Solaris 10 servers. Lately, we have been having some ftp problems in this server. Though it can ping any server within the network, it seems that it can only ftp to a select few. For most servers, the... (4 Replies)
Discussion started by: labdakos
4 Replies

7. High Performance Computing

request more nodes

I am new to cluster commands. But I have tried utilizing: -pe, but I do not know my parallel computing environment. We are running SGE, is there a simpler command to request more nodes? also: qsub -N auto -M name@email.com -m abe auto.sh does not email me at all. Help would be appreciated (0 Replies)
Discussion started by: theawknewbie
0 Replies

8. UNIX for Dummies Questions & Answers

One service, two nodes, HA

Hi all. I have two nodes taken different places. They are connected together on a network. So, i have a service, it works on one of nodes and when the node is unavailable the service should will be launched on other node. Solution: rhel cluster, keepalive, hearbeat...may be Carp but what if... (2 Replies)
Discussion started by: Flomaster
2 Replies

9. Shell Programming and Scripting

Remove duplicate nodes

Hi all, I have a list of node pairs separated with a comma and also, associated with their respective values. For example: b0015,b1224 1.1 b0015,b2576 1.4 b0015,b3162 2.5 b0528,b1086 1.7 b0528,b1269 5.4 b0528,b3602 2.1 b0948,b2581 3.2 b1224,b0015 1.1... (8 Replies)
Discussion started by: AshwaniSharma09
8 Replies

10. UNIX for Advanced & Expert Users

How keep running a program n an another computer via a connection ssh when the connection is closed?

Hi everybody, I am running a program on a supercomputer via my personal computer through a ssh connection. My program take more than a day to run, so when I left work with my PC I stop the connection with the supercomputer and the program stop. I am wondering if someone know how I can manage... (2 Replies)
Discussion started by: TomTomGre
2 Replies
Graph::Reader::XML(3pm) 				User Contributed Perl Documentation				   Graph::Reader::XML(3pm)

NAME
Graph::Reader::XML - class for reading a Graph instance from XML SYNOPSIS
use Graph::Reader::XML; use Graph; $reader = Graph::Reader::XML->new(); $graph = $reader->read_graph('mygraph.xml'); DESCRIPTION
Graph::Reader::XML is a perl class used to read a directed graph stored as XML, and return an instance of the Graph class. The XML format is designed to support the Graph classes: it can be used to represent a single graph with a collection of nodes, and edges between those nodes. The graph, nodes, and edges can all have attributes specified, Graph::Reader::XML is a subclass of Graph::Reader, which defines the generic interface for Graph reader classes. METHODS
new() Constructor - generate a new reader instance. $reader = Graph::Reader::XML->new(); This doesn't take any arguments. read_graph() Read a graph from a file: $graph = $reader->read_graph( $file ); The $file argument can be either a filename or a filehandle of a previously opened file. KNOWN BUGS
Attribute values must be scalar. If they're not, well, you're on your own. SEE ALSO
Graph::Reader The base class for Graph::Reader::XML. Graph::Writer::XML Used to serialise a Graph instance as XML. Graph Jarkko Hietaniemi's classes for representing directed graphs. AUTHOR
Neil Bowers <neil@bowers.com> COPYRIGHT
Copyright (c) 2001-2012, Neil Bowers. All rights reserved. Copyright (c) 2001, Canon Research Centre Europe. All rights reserved. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.14.2 2012-02-14 Graph::Reader::XML(3pm)
All times are GMT -4. The time now is 09:59 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy