Re: matrix functions
| From: | Jason Wong | Date: | Tue, 11 Jun 2002 06:01:03 +0000 |
| Subject: | Re: matrix functions | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-101502@lists.php.net to get a copy of this message | ||
On Tuesday 11 June 2002 11:32, johannes reichardt wrote:
> hi list,
>
> i have a question regarding a class for matrix modifications so i dont
> have to re-invent the wheel ;)
>
> i would like to do things like this:
>
> matrix with 5*5 colums/rows
>
> x x x x x
> 0 0 0 0 0
> x x x x x
> x x x x x
> x x x x x
>
>
> x x x x x
> x x x x x
> 0 0 0 0 0
> x x x x x
> x x x x x
>
>
> maybe that is incredebly stupid and simple but
> my brain doesnt tell me anything right now -
> how can i transform colums/rows quickly and efficient?
If all you want to do is move one row of a matrix to another then stuff your
matrix into an array and use array_slice(), array_splice().
--
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
/*
Absurdity, n.:
A statement or belief manifestly inconsistent with one's own opinion.
-- Ambrose Bierce, "The Devil's Dictionary"
*/