[Numpy-discussion] length - sticks algorithm

2014-07-22 Thread Josè Luis Mietta
Hi experts! Im working with conductivity of sticks film - systems. In my algorithm (N sticks) I have the intersection graph matrix M (M is a NxN matrix, M_ij=1 if sticks 'i' and 'j' do intersect, and M_ij=0 if sticks 'i' and 'j' do not). Also I have 2 lists with the end-points of each stic

[Numpy-discussion] plt.show() and plt.draw() doesnt work

2014-07-12 Thread Josè Luis Mietta
Hi experts! I have a numpy array M. I generate a graph using NetworkX and then I want to draw this graph:     import networkx as nx     import matplotlib.pyplot as plt     G=nx.graph(M)     nx.draw(G)     plt.draw() Doing this, no picture appears. In addition, if I do `plt.show()` no picture a

[Numpy-discussion] Number of elements in a intersection graph

2014-07-08 Thread Josè Luis Mietta
Hi experts!! I am studying the intersection between line segments (sticks). I have an Numpy array (M) corresponding to the intersection graph of the system (the element Mij = 1 if the sticks' i 'and' 'j' intersect, and Mij = 0 if not intersect). I want to determine the number of elements that

[Numpy-discussion] At.: use less RAM memory and increase execution speed

2013-09-26 Thread Josè Luis Mietta
Hi experts! I wanna use less RAM memory in my Monte Carlo simulations. In my algorithm I use numpy arrays and xrange() function. I hear that I can reduce RAM used in my lagorithm if I do the next: 1) replace xrange() for range(). 2) replace numpya arrays for python lists 3) use reset() funct

[Numpy-discussion] Networkx graph - numpy array - networkx.has_path() function

2013-09-06 Thread Josè Luis Mietta
Hi experts! I wanna use networkx.has_path(). This is applies, necesary, to a networkx graph. I have a adjacency matrix of a undirected graph (M, wich is a numpy matrix (array of N x N elements)). How can I do for use M in  networkx.has_path()? If I must transform M into a networkx graph: ho

Re: [Numpy-discussion] Stick intersection path algorithm

2013-09-05 Thread Josè Luis Mietta
Thanks so much!!   Best regards, José Luis De: Daπid Para: Discussion of Numerical Python Enviado: jueves, 5 de septiembre de 2013 12:56 Asunto: Re: [Numpy-discussion] Stick intersection path algorithm On 5 September 2013 17:03, Josè Luis Mietta wrote

Re: [Numpy-discussion] Stick intersection path algorithm

2013-09-05 Thread Josè Luis Mietta
algorithm On 5 September 2013 17:03, Josè Luis Mietta wrote: The array ([ 0, 39,  7,  3,  1,  1,  0,  0,  0,  0,  1,  0,  0,  0,  0,  0,  0, 0,  0,  1]) means that in the sistem (graph) are : 4 cluster of size 1, one cluster of size 3, one cluster of size 7 and one cluste of size 39? No, it means

Re: [Numpy-discussion] Stick intersection path algorithm

2013-09-05 Thread Josè Luis Mietta
? Thans a lot! José Luis De: Daπid Para: Discussion of Numerical Python Enviado: jueves, 5 de septiembre de 2013 11:06 Asunto: Re: [Numpy-discussion] Stick intersection path algorithm On 5 September 2013 13:14, Josè Luis Mietta wrote: 2. Using network

Re: [Numpy-discussion] Stick intersection path algorithm

2013-09-05 Thread Josè Luis Mietta
e: [Numpy-discussion] Stick intersection path algorithm On Wed, Sep 4, 2013 at 3:17 PM, Josè Luis Mietta wrote: > > Hi experts! > > If I do: > > G = Graph(M) > > That is: to use the associated intersection graph, where the vertices are the > sticks and there is an edge

Re: [Numpy-discussion] Stick intersection path algorithm

2013-09-04 Thread Josè Luis Mietta
ers. Thanks a lot!! De: Robert Kern Para: Discussion of Numerical Python Enviado: lunes, 2 de septiembre de 2013 10:40 Asunto: Re: [Numpy-discussion] Stick intersection path algorithm On Sun, Sep 1, 2013 at 11:55 PM, Josè Luis Mietta wrote: > > Hi e

Re: [Numpy-discussion] Stick intersection path algorithm

2013-09-01 Thread Josè Luis Mietta
-discussion] Stick intersection path algorithm On Sun, Sep 1, 2013 at 3:55 PM, Josè Luis Mietta wrote: Given two arbitrary sticks, i need a simple and effective algorithm that determinate if that two sticks are conected by a 'intersected-sticks' path. > > > do you mean a test

[Numpy-discussion] Stick intersection path algorithm

2013-09-01 Thread Josè Luis Mietta
Hi experts! I wanna study the intersection between line segments (sticks). I wrote a algorithm that generate a matrix, M, with N rows and N columns. The M-element Mij is 1 if stick number 'i' intersect stick number 'j' (obviously M is symmetric). Given two arbitrary sticks, i need a simple and

Re: [Numpy-discussion] Stick (line segments) percolation algorithm - graph theory?

2013-08-29 Thread Josè Luis Mietta
probably add an interval check to ensure that the x and y intervals for the segments of interest overlap before doing the full check, but how much that would help would depend on the implementations. ~Brett On Fri, Aug 23, 2013 at 5:09 PM, Josè Luis Mietta wrote: I wrote an algorithm

[Numpy-discussion] Stick (line segments) percolation algorithm - graph theory?

2013-08-23 Thread Josè Luis Mietta
Hi experts! I wrote an algorithm for study stick percolation (i.e.: networks between line segments that intersect between them). In my algorithm N sticks (line segments) are created inside a rectanglar box of sides 'b' and 'h' and then, one by one, the algorithm explores the intersection between

[Numpy-discussion] At.: question about RAM problem in numpy array code

2013-08-19 Thread Josè Luis Mietta
 Hi experts! I have a core i3 3GB RAM Toshiba laptop. Im a newby Ubuntu 13.04, python and sage user. I note that RAM memory becomes full while running script (starts in 50% of RAM ocupation and becomes to 100% (full)). This generate that operating system become slower... In the code few numpy a