Click here to Skip to main content
15,890,512 members
Home / Discussions / Algorithms
   

Algorithms

 
GeneralRe: help me About Big O Pin
Paul Conrad9-Dec-08 13:15
professionalPaul Conrad9-Dec-08 13:15 
AnswerRe: help me About Big O Pin
73Zeppelin10-Dec-08 18:51
73Zeppelin10-Dec-08 18:51 
AnswerRe: help me About Big O Pin
J. Andrew Smith6-Mar-09 3:16
J. Andrew Smith6-Mar-09 3:16 
QuestionCholeski's Algorithm Pin
BobInNJ6-Dec-08 6:06
BobInNJ6-Dec-08 6:06 
AnswerRe: Choleski's Algorithm Pin
73Zeppelin6-Dec-08 6:36
73Zeppelin6-Dec-08 6:36 
GeneralRe: Choleski's Algorithm Pin
BobInNJ7-Dec-08 2:30
BobInNJ7-Dec-08 2:30 
GeneralRe: Choleski's Algorithm Pin
73Zeppelin8-Dec-08 22:40
73Zeppelin8-Dec-08 22:40 
GeneralRe: Choleski's Algorithm Pin
Luc Pattyn6-Dec-08 6:40
sitebuilderLuc Pattyn6-Dec-08 6:40 
Hi,


BobInNJ wrote:
l[j][i] = sum/l[i-1][i-1];


IMO this is where the problem is.


Some more comments:

1.
the first few lines are not really useful
l[0][0] = sqrt(a[0][0]);
for( int j=2; j<=n; j++ )l[j-1][0] = a[j-1][0]/l[0][0];
you could get them for free by starting the next for loop with i=1 instead of i=2

2.
you are aware you could do the same thing in place? i.e. you can store l in a, you don't really need a separate array for input and output.

Smile | :)

Luc Pattyn [Forum Guidelines] [My Articles]

Fixturized forever. Confused | :confused:


QuestionClarke and Wright Algorithm Pin
Hemanth_k5-Dec-08 17:44
Hemanth_k5-Dec-08 17:44 
AnswerRe: Clarke and Wright Algorithm Pin
Robert.C.Cartaino6-Dec-08 4:52
Robert.C.Cartaino6-Dec-08 4:52 
Questionplz help me in writing an algorithm of the following problem Pin
IrfanHaleem30-Nov-08 10:22
IrfanHaleem30-Nov-08 10:22 
AnswerRe: plz help me in writing an algorithm of the following problem Pin
Member 419459330-Nov-08 10:54
Member 419459330-Nov-08 10:54 
GeneralRe: plz help me in writing an algorithm of the following problem Pin
IrfanHaleem30-Nov-08 10:57
IrfanHaleem30-Nov-08 10:57 
GeneralRe: plz help me in writing an algorithm of the following problem Pin
Luc Pattyn30-Nov-08 12:17
sitebuilderLuc Pattyn30-Nov-08 12:17 
GeneralRe: plz help me in writing an algorithm of the following problem Pin
Lutosław2-Dec-08 6:00
Lutosław2-Dec-08 6:00 
GeneralRe: plz help me in writing an algorithm of the following problem Pin
Paul Conrad2-Dec-08 6:55
professionalPaul Conrad2-Dec-08 6:55 
GeneralRe: plz help me in writing an algorithm of the following problem Pin
Lutosław2-Dec-08 8:04
Lutosław2-Dec-08 8:04 
GeneralRe: plz help me in writing an algorithm of the following problem Pin
Paul Conrad2-Dec-08 8:07
professionalPaul Conrad2-Dec-08 8:07 
AnswerRegarding requests to do homework questions. Pin
73Zeppelin30-Nov-08 23:26
73Zeppelin30-Nov-08 23:26 
GeneralRe: Regarding requests to do homework questions. Pin
Paul Conrad2-Dec-08 6:53
professionalPaul Conrad2-Dec-08 6:53 
AnswerRe: plz help me in writing an algorithm of the following problem Pin
Lutosław2-Dec-08 6:06
Lutosław2-Dec-08 6:06 
GeneralRe: plz help me in writing an algorithm of the following problem Pin
stevepqr11-Jan-09 21:53
stevepqr11-Jan-09 21:53 
QuestionData Consistency Pin
Patje27-Nov-08 5:53
Patje27-Nov-08 5:53 
GeneralRe: Data Consistency Pin
Luc Pattyn27-Nov-08 10:34
sitebuilderLuc Pattyn27-Nov-08 10:34 
GeneralRe: Data Consistency Pin
Patje27-Nov-08 23:36
Patje27-Nov-08 23:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.