Boost logo

Boost Users :

From: Sohail Somani (s.somani_at_[hidden])
Date: 2006-03-29 17:18:08


Yes, I think this seems to be the case.

I read some posts about how multi_array might be extended to support
more numerical code. How do you suppose this would be done?

> -----Original Message-----
> From: Ronald Garcia [mailto:garcia_at_[hidden]]
> Sent: Wednesday, March 29, 2006 2:10 PM
> To: Sohail Somani
> Cc: boost-users_at_[hidden]
> Subject: Re: [MultiArray] Banded matrix
>
> Hi Sohail,
>
> You will likely not be able to get this to work correctly. The
> multi_array_ref operators rely upon the dense representation of an
> array. More likely you will want to use template function that uses
> array notation as in:
>
> template <class Array>
> void some_fcn(const Arrray& m);
>
> ron
>
> On Mar 29, 2006, at 3:04 PM, Sohail Somani wrote:
>
> > Well, I'd like to use a banded_matrix *as* a multi_array.
> For example:
> >
> > some_fcn( const multi_array_ref<T,2> & m);
> >
> > I'd like to pass in an implementation of a multi_array_ref<T,2>
> > that is
> > optimized to only hold three diagonals of the array (for example).
> >
> > Should this not be done? :)
> >
> > Sohail
> >
> >> -----Original Message-----
> >> From: Ronald Garcia [mailto:garcia_at_[hidden]]
> >> Sent: Wednesday, March 29, 2006 12:01 PM
> >> To: Sohail Somani
> >> Cc: boost-users_at_[hidden]
> >> Subject: Re: [MultiArray] Banded matrix
> >>
> >> Hi Sohail,
> >>
> >> I'm not clear on what you mean "used as a multi_array_ref". Could
> >> you elaborate what you are tryijng to do?
> >>
> >> ron
> >>
> >> On Mar 28, 2006, at 1:56 PM, Sohail Somani wrote:
> >>
> >>> Hi,
> >>>
> >>> I'd like to continue to use multi array as my array type
> >> for numerical
> >>> work. I'd like to hear some suggestions on how I could implement a
> >>> banded matrix based on multi_array such that it could be used as a
> >>> multi_array_ref. The obvious solution is to subclass, have
> >> an array of
> >>> multi_array<T,1> and overload the indexing operators.
> >>>
> >>> Are there any gotchas?
> >>>
> >>> Thanks!
> >>>
> >>> Sohail
> >>
> >>
>
>


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net