Visual Basic.net Passing arrays in procedures

  • Thread starter Thread starter Michael
  • Start date Start date
M

Michael

Is there a way to pass only a sub-matrix (part of a larger) matrix in a
procedure by identifying the leading row/column element similar to what is
done in Fortran

I am trying to convert several linear algebra fortran routines over to VB
net and this is a problem area. I realize that i can copy the required
elements into a new array , pass it thru the routine and on return copy the
new elements back but this seems very inefficient.

Is ther a better way to do this in net. Have looked everywher but can't
find anything

Thanks
 
Michael said:
Is there a way to pass only a sub-matrix (part of a larger) matrix in a
procedure by identifying the leading row/column element similar to what is
done in Fortran

You can pass additional start/end indices to the procedure.
 
:
: Is there a way to pass only a sub-matrix (part of a larger) matrix in
: a procedure by identifying the leading row/column element similar to
: what is done in Fortran
:
: I am trying to convert several linear algebra fortran routines over to
: VB net and this is a problem area. I realize that i can copy the
: required elements into a new array, pass it thru the routine and on
: return copy the new elements back but this seems very inefficient.
:
: Is ther a better way to do this in net. Have looked everywher but
: can't find anything
:
: Thanks


I'm not aware of anyway you could pass a partial array in a function
call. Your only two options are to manually create the smaller array as
you've suggested above (which is terribly inefficient as you've noted)
or take Herfried's suggestion and pass in start and finish indices.


Ralf
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top