Re: Finding maximum of an array
- From: "Richard Lavoie" <somone@xxxxxxxxxxxxx>
- Date: Mon, 28 Apr 2008 21:08:56 -0400
I see the point. I did something like this by moving row pointers
(consisting of arrays of singles) rather than row data. In this case, I am
exchanging pointers, moving pointers of invalid rows at the end of the
matrix and then ignoring them when doing additional computer. But when
deleting columns, I still have to move a lot of data for every row.
But if I understand it well, I would add an array of row/column index,
indicating that row or column #1 is actually row and column #10 and row and
column number #2 actually correspond to the row and columns #12. It will
add an extra step to the access of the data, but I believe it could result
in a major speed improvement.
Since the procedure delete row n and column n at the same time, only one
index would be needed. Seems like a pretty good way to do it and I will
test this for sure. It may however take some times for me to implement
something like this (busy solving another bottleneck) but I will be back and
will let you know whether it works.
Richard
"Q Correll" <qcorrell@xxxxxxxxxxxxx> wrote in message
news:48164c24$1@xxxxxxxxxxxxxxxxxxxxxxxxx
Anders,
| If you address your matrix indirectly through a Row vector and a Col
| vector the 'deletion' will take almost no time at all. Just remove
| the row index from the Row vector and the col index from the Col
| vector. No need to actually move all the matrix data around.
I was just about to mention that same approach when I encountered your
post. <g>
--
Q
04/28/2008 15:13:21
XanaNews Version 1.17.5.7 [Q's Salutation mod]
.
- Follow-Ups:
- Re: Finding maximum of an array
- From: Q Correll
- Re: Finding maximum of an array
- References:
- Finding maximum of an array
- From: Richard Lavoie
- Re: Finding maximum of an array
- From: John Herbster
- Re: Finding maximum of an array
- From: Richard Lavoie
- Re: Finding maximum of an array
- From: Dennis
- Re: Finding maximum of an array
- From: Richard Lavoie
- Re: Finding maximum of an array
- From: Dennis
- Re: Finding maximum of an array
- From: Richard Lavoie
- Re: Finding maximum of an array
- From: Anders Isaksson
- Re: Finding maximum of an array
- From: Q Correll
- Finding maximum of an array
- Prev by Date: Re: Finding maximum of an array
- Next by Date: Cheap Baume & Mercier Linea Watches - Baume & Mercier Linea Watch Cheapest
- Previous by thread: Re: Finding maximum of an array
- Next by thread: Re: Finding maximum of an array
- Index(es):
Relevant Pages
|