![]() |
Blitz Support : |
From: Julian Cummings (cummings_at_[hidden])
Date: 2003-09-03 16:28:12
Hello Einar,
Since 2D and 3D Arrays are different instantiations of a class template
(i.e., unrelated classes), using the constructors for pre-existing data
and passing the data pointer from
one Array into the constructor for the other is probably the best way to
do this. Of course,
there is already support for slicing an Array and reducing its
dimensionality. But increasing the dimensionality by reinterpreting the
internal 1D data structure is quite a different thing.
Just be careful that the data buffer sizes for the two Arrays match and
have the same number of total elements.
Regards, Julian C.
Einar Otnes wrote:
> Is there any functionality in Blitz to reshape an array from, e.g. a
> 2D array to a 3D array? I guess it can be done using the constructors
> used for pre-existing data, but is it a better solution?
>
>
>
> Regards,
>
> Einar
>
>------------------------------------------------------------------------
>
>_______________________________________________
>Blitz-support mailing list
>Blitz-support_at_[hidden]
>http://www.oonumerics.org/mailman/listinfo.cgi/blitz-support
>
>
-- Dr. Julian C. Cummings E-mail: cummings_at_[hidden] California Institute of Technology Phone: 626-395-2543 1200 E. California Blvd., Mail Code 158-79 Fax: 626-584-5917 Pasadena, CA 91125