SV650.org - SV650 & Gladius 650 Forum



Idle Banter For non SV and non bike related chat (and the odd bit of humour - but if any post isn't suitable it'll get deleted real quick).
There's also a "U" rating so please respect this. Newbies can also say "hello" here too.

Reply
 
Thread Tools
Old 13-08-08, 04:44 PM   #21
Baph
Guest
 
Posts: n/a
Default Re: Hashes of Arrays, who'd have 'em

Quote:
Originally Posted by 2mths View Post
No idea what about FIFO structures (I can work out what it stands for but that's not helping) so looping is all I've got.
As you've worked out, FIFO == First In First Out. Basically, pick one end of the array to add things to, and only remove things from the other end of the array. Doesn't matter if this is the "bottom" of the array, but it's usually easier that way.

Quote:
Originally Posted by timwilky View Post
You them move into things like java collections and arrays etc. But now you no longer have those nice pointers that allowed you to do fancy tricks, like stepping through arrays etc using pointer arithmetic.
Java actually does support pointer arithmetic (as of Java 1.5). The only thing you can't do is uninitialise an object (though you can finalize() which is tantamount to the same thing really), and you can't deallocate memory.

Last edited by Baph; 13-08-08 at 04:48 PM. Reason: spelling, again. :(
  Reply With Quote
Old 13-08-08, 04:45 PM   #22
Baph
Guest
 
Posts: n/a
Default Re: Hashes of Arrays, who'd have 'em

Quote:
Originally Posted by 2mths View Post
Data set returned along line of...

Day Production Line Qty
2
So you have an array of arrays, the the outer being columns, the inner being specific row data?
  Reply With Quote
Old 13-08-08, 04:51 PM   #23
2mths
Guest
 
Posts: n/a
Default Re: Hashes of Arrays, who'd have 'em

Nah I posted again without meaning to (bloody annoying - not sure what I'm doing)

Basically at one point I wanted an Array of Arrays (for one type of graph), then changed my mind and went back to wanting a Hash of Arrays to produce separate graphs (by looping round the keys and using making a simple array of (2) arrays on each loop).

I've done a ****e job of explaining it, not helped my mis-posting twice. I'll look at it tomorrow.

Basically my problem is syntax and in there I'm not helped by not understanding things like references.
  Reply With Quote
Old 13-08-08, 05:09 PM   #24
Baph
Guest
 
Posts: n/a
Default Re: Hashes of Arrays, who'd have 'em

Quote:
Originally Posted by Luckypants View Post
AKA a queue to us oldies.
Ah, but a specific queue.

For example, Pringles are arranged into a "queue" - in that you have to get one (or a group) out first, but those you pull out were among the last in the container.
  Reply With Quote
Old 13-08-08, 06:47 PM   #25
timwilky
Member
Mega Poster
 
timwilky's Avatar
 
Join Date: Mar 2004
Location: Not in Yorkshire. (Thank God)
Posts: 4,116
Default Re: Hashes of Arrays, who'd have 'em

queues are nice things to work with when you start to add functionality to insert into queues, delete from queue, service the first member, last member etc.

You end up with structures that contain pointers to the previous member, next member of the queue, plus either a pointer to the data item or if a privative type that data item. In that way, you can end up coding a whole structure to implement stacks (simple push/pop) for a LIFO implementation. or your FIFO. You then need to build a good enumerator round it to efficiently walk the queue.

Mike, I think of a queue (from above), as more than a FIFO as there is a lot more you can do with it. my best analogy of a FIFO is in a pipe implementation, there is only two methods involved to insert something to the tail end of a pipe and extract something from the head end of the pipe.

Baph
Thanks for the heads up re pointer functionality of 1.5. I must admit I have not read the spec, and tend to still think 1.2/1.3 with some added extra class implementations
__________________
Not Grumpy, opinionated.
timwilky is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Friends, Who'd have 'em? Stu Idle Banter 22 10-12-08 11:12 PM
Who'd have thought? licoricepizza Idle Banter 0 22-11-07 03:51 PM
Who'd be up for.......? independentphoto SV Ecosse 51 02-09-07 07:52 AM
Who'd be in sales! Mogs Idle Banter 3 12-02-07 04:01 PM
Who'd like one of these.. kciN Idle Banter 7 02-08-06 08:52 PM


All times are GMT. The time now is 09:08 PM.


Powered by vBulletin® - Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.