Greetings everyone,
I need to write a small program for handling numeric 2D arrays...
As a special requirement I need to reorder certain rows and columns within an array...
I think the right way to do it is by creating a new displaced array but I don't have the expertise needed for the task...
I'd like something like:
(reorder-row <array> <current-row-index> <new-row-index> )
(reorder-col <array> <current-col-index> <new-col-index>)
preferably destructive versions, although I think using displacement requires non-destructive...
Can someone give an example of how to implement these?
Thanks in advance
I need to write a small program for handling numeric 2D arrays...
As a special requirement I need to reorder certain rows and columns within an array...
I think the right way to do it is by creating a new displaced array but I don't have the expertise needed for the task...
I'd like something like:
(reorder-row <array> <current-row-index> <new-row-index> )
(reorder-col <array> <current-col-index> <new-col-index>)
preferably destructive versions, although I think using displacement requires non-destructive...
Can someone give an example of how to implement these?
Thanks in advance