Jump to content

Many-dimensional arrays, flexible intelligent handling?


torekp

Recommended Posts

I have spent I-don't-know how many hours working with ways to build, transpose, and graph many-dimensional arrays. Many = more than 2. But lately I wonder: what the heck was I thinking? Why not just do everything with one-dimensional arrays of data, plus an additional one-dimensional array (per array) of sizes? Then when push comes to shove (i.e. it's time to graph something or save to a file) use Reshape Array as needed?

Additionally I'm thinking, this might save me the need to convert to and from variants in order to create a don't-care-how-many-dimensions-it-really-has array variable. After all, in this approach all arrays have "one dimension" regardless of how many they "really" have.

Now, surely this has all been done before, so please, point me to it. Also if you have experience with this kind of thing, please share your Do's and Don't's.

Link to comment
I have spent I-don't-know how many hours working with ways to build, transpose, and graph many-dimensional arrays. Many = more than 2. But lately I wonder: what the heck was I thinking? Why not just do everything with one-dimensional arrays of data, plus an additional one-dimensional array (per array) of sizes? Then when push comes to shove (i.e. it's time to graph something or save to a file) use Reshape Array as needed?

Additionally I'm thinking, this might save me the need to convert to and from variants in order to create a don't-care-how-many-dimensions-it-really-has array variable. After all, in this approach all arrays have "one dimension" regardless of how many they "really" have.

Now, surely this has all been done before, so please, point me to it. Also if you have experience with this kind of thing, please share your Do's and Don't's.

See reply #9 in this thread from back before LAVA was invented.

http://forums.ni.com/ni/board/message?boar...id=84171#M34111

Ben

Link to comment

Gory details and/or downloadable examples, please! Yes it's comforting to see that great minds have blazed this path before - but it'd be even more comforting to have everything handed to me on a silver platter. ;)

And now you see why my avatar is a pest ...

Link to comment
Gory details and/or downloadable examples, please! Yes it's comforting to see that great minds have blazed this path before - but it'd be even more comforting to have everything handed to me on a silver platter. ;)

And now you see why my avatar is a pest ...

This kind of reply, to someone like Ben, who has been a pretty consistent and outstanding contributor to this forum does not show why your avatar is a pest, ... it shows that you have the wrong avatar.

We all like code-on-a-platter at times, but your demanding attitude is pretty out of place here, especially since you didn't tell us where and how you searched these forums for possible or partial solutions to your problem, nor did you post any VIs showing how you had tried to solve or begin to solve the problem yourself.

Asking for a shrink wrapped solution isn't always a bad thing if it is accompanied by a little more humility and helpfulness. So far, you have shown neither. :nono:

Link to comment

Dang, Mike, you sure know how to take the fun out of self-parody!

I didn't find anything on my own when I searched for "reshape array" on this forum and (later) NI discussion forums. Well I did find one other thread in NI forums in which a few people said that this would be a cool idea. Unlike the post by Jim Kring that Ben pointed me to, no one else had actually created the flexible one-dimensional-but-really-more array handler, they just thought it would be a good idea.

I do intend to contribute, by re-submitting some of my "stupid array tricks" from the share your favorite user lib Vis thread. Once I convert them to their more flexible versions, hopefully they'd be worthy of going to the code repository.

Even if someone does hand me what I want on a silver platter, there's a good chance I'll be able to add to it. If I build the one-dimension-is-many idea from scratch, LAVA will get my array utilities handed on a paper plate, most likely, since I'm likely to overlook some things that real programmers would know how to do. That's the flip side of my (affected, mostly) demanding attitude.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.