Re: Representing mathematical equations

2014-10-06 Thread Michael Torrie
On 10/06/2014 10:45 AM, Peter Pearson wrote: > I don't think the OP is interested in complex numbers. I think this > is a question about organizing loops. But I can't tell for sure. Poor choice of words on my part. I meant complicated. This is exactly the kind of thing that people use numpy and

Re: Representing mathematical equations

2014-10-06 Thread Rustom Mody
On Monday, October 6, 2014 11:18:55 PM UTC+5:30, Rustom Mody wrote: > >>> sum([(x,y) for (x,y) in L]) > Traceback (most recent call last): > TypeError: unsupported operand type(s) for +: 'int' and 'tuple' > Python just expressing that you are goofing off by trying to add tuples > rather than numb

Re: Representing mathematical equations

2014-10-06 Thread Rustom Mody
On Monday, October 6, 2014 10:52:40 PM UTC+5:30, Dave Angel wrote: > varun7rs Wrote in message: > > On Monday, 6 October 2014 15:03:44 UTC+2, Varun wrote: > (Deleted all the 8-space quoting. Either use a better email client > or remove the extra 7 lines between every line you > quote.) > >> Ok

Re: Representing mathematical equations

2014-10-06 Thread Dave Angel
varun...@gmail.com Wrote in message: > On Monday, 6 October 2014 15:03:44 UTC+2, varu...@gmail.com wrote: > (Deleted all the 8-space quoting. Either use a better email client or remove the extra 7 lines between every line you quote.) >> >> Okay, I forgot to explain them. L is a set of links,

Re: Representing mathematical equations

2014-10-06 Thread Peter Pearson
On Mon, 06 Oct 2014 08:42:01 -0600, Michael Torrie wrote: > On 10/06/2014 07:07 AM, varun...@gmail.com wrote: >>> Okay, I forgot to explain them. L is a set of links, dist is a >>> number (distance), bd is the bandwidth and hc is a number as well >>> (hopcount)...different bandwidths, hopcounts an

Re: Representing mathematical equations

2014-10-06 Thread Michael Torrie
On 10/06/2014 07:07 AM, varun...@gmail.com wrote: >> Okay, I forgot to explain them. L is a set of links, dist is a >> number (distance), bd is the bandwidth and hc is a number as well >> (hopcount)...different bandwidths, hopcounts and distances for different >> links... b(i,x) is what i intend to

Re: Representing mathematical equations

2014-10-06 Thread Mark Lawrence
On 06/10/2014 14:07, varun...@gmail.com wrote: [snip 69 lines] L = [(1,3), (5,7), .] bd = [23, 34,43.44.] dist = [3,7,5,7, ] hc = [2,3,4,1,2,2,...] for every l belonging to L, i could be either 1 or 3 for L[0], similarly for L[1] it could be 5 or 7 Would you please access this

Re: Representing mathematical equations

2014-10-06 Thread varun7rs
On Monday, 6 October 2014 15:03:44 UTC+2, varu...@gmail.com wrote: > On Monday, 6 October 2014 13:14:04 UTC+2, varu...@gmail.com wrote: > > > Hello, > > > > > > > > > > > > I am working on a mathematical equation which I'm finding really hard to > > express in python. Could any of you sp

Re: Representing mathematical equations

2014-10-06 Thread varun7rs
On Monday, 6 October 2014 13:14:04 UTC+2, varu...@gmail.com wrote: > Hello, > > > > I am working on a mathematical equation which I'm finding really hard to > express in python. Could any of you spare some time to help me out? > > > > The equation looks like this > > > > b(i,x) = [Σ(l∈L)

Representing mathematical equations

2014-10-06 Thread varun7rs
Hello, I am working on a mathematical equation which I'm finding really hard to express in python. Could any of you spare some time to help me out? The equation looks like this b(i,x) = [Σ(l∈L) [bd(l) * dist(l) * hc(l)]] / Σ(l∈L) l I have a problem in representing the above equation. I don't