![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Jan 2005
Posts: 3
Rep Power: 0
![]() |
Hi everyone. I am a newbie in programming. Here comes a simple question, and please kindly help.
I am going to write a programme for a mathematical recurrence relation involving matrices, say {X}_i = {X}_i-1 + {X}_i-2, where {X}_i is a 2x2 matrix, and {X}_0 and {X}_1 are known. Should I declare {X}_i first before everything start? I just think of using a for loop to declare i matrices, but I don't know how to change the variable,i, in {X}_i in the declaration. Would anyone please kindly help answer this question? |
|
|
|
|
|
#2 |
|
Professional Programmer
|
you could make a doubly-linked list of 2x2 arrays. that way you can make a cursor that can navigate through the list. The list elements would have to hold the 'i' and the array ex.
[{X}, 0]<=>[{X},1]<=>...<=>[{X},i-1]<=>[{X},i]-JSS |
|
|
|
|
|
#3 |
|
Expert Programmer
|
Instead of making a doubly linked list, just use the std::list class, much easier.
__________________
Clifford Matthew Roche <geek@cliffordroche.com> Web Hosting: http://www.crd-hosting.com Consulting: http://www.crdev-consulting.com |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|