Multi-dimensional arrays and MultiList
Posted: Tue Apr 30, 2013 10:11 am
I see my Code Jam post was deleted. That's fine, guess it was off topic. On topic then, one of the things I hit a snag on during the competition was multi-dimensional arrays. Since the first thing I tried didn't work I just fell back to List<of List<of whatever>> as it was what I was most familiar with.
I did some searching on the forum and it seems there's a patch floating around for multi-dimensional arrays that hasn't been applied yet. Either that or it's supported but I got the syntax wrong. I also seem to remember jaegs doing some enhancements to the MultiList class but since I had never used it before I thought the middle of a timed-event was not the best time to start
So, my questions are:
1. What is the current status and future plan for mutli-dimensional arrays?
2. I was reviewing this Wiki page: http://cobra-language.com/trac/cobra/wi ... ionalArray which is about MultiList and was wondering what this means? Maybe I am not understanding something but why would mutability prevent this?
3. For the equals override, this isn't the only criteria, right? The actual element values also have to be equal I assume?
4. Any chance of seeing a HowTo for MutliList? I would be willing to make one if nobody else has the time. Of course, I'd have to figure out how to use it first.
I did some searching on the forum and it seems there's a patch floating around for multi-dimensional arrays that hasn't been applied yet. Either that or it's supported but I got the syntax wrong. I also seem to remember jaegs doing some enhancements to the MultiList class but since I had never used it before I thought the middle of a timed-event was not the best time to start
So, my questions are:
1. What is the current status and future plan for mutli-dimensional arrays?
2. I was reviewing this Wiki page: http://cobra-language.com/trac/cobra/wi ... ionalArray which is about MultiList and was wondering what this means? Maybe I am not understanding something but why would mutability prevent this?
def getHashCode
"""
As a completely mutable object, MultiList does not
support getHashCode
"""
3. For the equals override, this isn't the only criteria, right? The actual element values also have to be equal I assume?
def equals(m as MultiList<of T>)
"""
Equal if shapes are the same, and
elements are in the same order.
Ignores .isReadOnly, .isPermuted, .isReferred
"""
4. Any chance of seeing a HowTo for MutliList? I would be willing to make one if nobody else has the time. Of course, I'd have to figure out how to use it first.