<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:series="http://unfoldingneurons.com/"
		>
<channel>
	<title>Comments on: ActionScript 3 MultiMap Class</title>
	<atom:link href="http://blog.hexagonstar.com/as3_multimap_class/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.hexagonstar.com/as3_multimap_class/</link>
	<description>&#34;Chaotic Neutral&#34;</description>
	<lastBuildDate>Thu, 11 Mar 2010 12:40:57 +0900</lastBuildDate>
	<generator>http://wordpress.org/?v=abc</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: sascha</title>
		<link>http://blog.hexagonstar.com/as3_multimap_class/comment-page-1/#comment-1437</link>
		<dc:creator>sascha</dc:creator>
		<pubDate>Sun, 21 Sep 2008 04:52:39 +0000</pubDate>
		<guid isPermaLink="false">http://blog.hexagonstar.com/actionscript-3-multimap-class/#comment-1437</guid>
		<description>Sev, yes thanks for the tip. I might be rewriting the class anyway soon so I will try using tables.</description>
		<content:encoded><![CDATA[<p>Sev, yes thanks for the tip. I might be rewriting the class anyway soon so I will try using tables.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sev</title>
		<link>http://blog.hexagonstar.com/as3_multimap_class/comment-page-1/#comment-1435</link>
		<dc:creator>Sev</dc:creator>
		<pubDate>Sun, 21 Sep 2008 01:51:17 +0000</pubDate>
		<guid isPermaLink="false">http://blog.hexagonstar.com/actionscript-3-multimap-class/#comment-1435</guid>
		<description>Hmm.. looking through your code makes me wonder why you don&#039;t use hash tables to store the array hash/map? I usually do sth like that (shortened, simplified):

_map : Object;

function setValue( key : String , value : * ) : void {
if ( _map[key] == undefined ) _map[key] = [];
_map[key].push(value);
}

That way you don&#039;t have to iterate through all lists which is MUCH faster. All methods in your class would be feasible with that data structure (I think). Or is there sth I&#039;m not getting? :)</description>
		<content:encoded><![CDATA[<p>Hmm.. looking through your code makes me wonder why you don&#8217;t use hash tables to store the array hash/map? I usually do sth like that (shortened, simplified):</p>
<p>_map : Object;</p>
<p>function setValue( key : String , value : * ) : void {<br />
if ( _map[key] == undefined ) _map[key] = [];<br />
_map[key].push(value);<br />
}</p>
<p>That way you don&#8217;t have to iterate through all lists which is MUCH faster. All methods in your class would be feasible with that data structure (I think). Or is there sth I&#8217;m not getting? <img src='http://blog.hexagonstar.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Randall Salas</title>
		<link>http://blog.hexagonstar.com/as3_multimap_class/comment-page-1/#comment-631</link>
		<dc:creator>Randall Salas</dc:creator>
		<pubDate>Fri, 13 Jun 2008 19:31:41 +0000</pubDate>
		<guid isPermaLink="false">http://blog.hexagonstar.com/actionscript-3-multimap-class/#comment-631</guid>
		<description>Hi All:
  I wonder if next thing if possible:
  If more than one key is accepted, it will return values based on:
  Key1, key2, key3, etc.

  And if just one key is entered, it should return all values that match that key.

Thx.

Randall</description>
		<content:encoded><![CDATA[<p>Hi All:<br />
  I wonder if next thing if possible:<br />
  If more than one key is accepted, it will return values based on:<br />
  Key1, key2, key3, etc.</p>
<p>  And if just one key is entered, it should return all values that match that key.</p>
<p>Thx.</p>
<p>Randall</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sascha</title>
		<link>http://blog.hexagonstar.com/as3_multimap_class/comment-page-1/#comment-630</link>
		<dc:creator>Sascha</dc:creator>
		<pubDate>Fri, 28 Sep 2007 02:25:36 +0000</pubDate>
		<guid isPermaLink="false">http://blog.hexagonstar.com/actionscript-3-multimap-class/#comment-630</guid>
		<description>Gaston, there&#039;s an example of how to use it in the class comment. Or did you mean something else?</description>
		<content:encoded><![CDATA[<p>Gaston, there&#8217;s an example of how to use it in the class comment. Or did you mean something else?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gaston</title>
		<link>http://blog.hexagonstar.com/as3_multimap_class/comment-page-1/#comment-629</link>
		<dc:creator>Gaston</dc:creator>
		<pubDate>Thu, 27 Sep 2007 16:07:21 +0000</pubDate>
		<guid isPermaLink="false">http://blog.hexagonstar.com/actionscript-3-multimap-class/#comment-629</guid>
		<description>how do i implement it? can i see an example? tk.</description>
		<content:encoded><![CDATA[<p>how do i implement it? can i see an example? tk.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eduardo</title>
		<link>http://blog.hexagonstar.com/as3_multimap_class/comment-page-1/#comment-628</link>
		<dc:creator>Eduardo</dc:creator>
		<pubDate>Sat, 25 Aug 2007 17:29:34 +0000</pubDate>
		<guid isPermaLink="false">http://blog.hexagonstar.com/actionscript-3-multimap-class/#comment-628</guid>
		<description>Hey! Thxs for the reply!

I think I gave the wrong mail now it&#039;s the correct! thanxS!!!</description>
		<content:encoded><![CDATA[<p>Hey! Thxs for the reply!</p>
<p>I think I gave the wrong mail now it&#8217;s the correct! thanxS!!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: AS3 Datenstrukturen at flash und so&#8230;</title>
		<link>http://blog.hexagonstar.com/as3_multimap_class/comment-page-1/#comment-623</link>
		<dc:creator>AS3 Datenstrukturen at flash und so&#8230;</dc:creator>
		<pubDate>Wed, 22 Aug 2007 19:42:41 +0000</pubDate>
		<guid isPermaLink="false">http://blog.hexagonstar.com/actionscript-3-multimap-class/#comment-623</guid>
		<description>[...] MultiMap ist eine Erweiterung der Hash-Tabelle von polygonal. [...]</description>
		<content:encoded><![CDATA[<p>[...] MultiMap ist eine Erweiterung der Hash-Tabelle von polygonal. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Actionscript Classes &#187; MultiMap</title>
		<link>http://blog.hexagonstar.com/as3_multimap_class/comment-page-1/#comment-627</link>
		<dc:creator>Actionscript Classes &#187; MultiMap</dc:creator>
		<pubDate>Wed, 22 Aug 2007 16:53:58 +0000</pubDate>
		<guid isPermaLink="false">http://blog.hexagonstar.com/actionscript-3-multimap-class/#comment-627</guid>
		<description>[...] http://blog.hexagonstar.com/as3_multimap_class/ [...]</description>
		<content:encoded><![CDATA[<p>[...] <a href="http://blog.hexagonstar.com/as3_multimap_class/">http://blog.hexagonstar.com/as3_multimap_class/</a> [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sascha</title>
		<link>http://blog.hexagonstar.com/as3_multimap_class/comment-page-1/#comment-626</link>
		<dc:creator>sascha</dc:creator>
		<pubDate>Mon, 11 Jun 2007 03:53:37 +0000</pubDate>
		<guid isPermaLink="false">http://blog.hexagonstar.com/actionscript-3-multimap-class/#comment-626</guid>
		<description>Hi Michael, adding a getValues method that always returns an array is a good idea. But it makes me thinking about if in that case changing the getValue method to always return an array makes sense. If the user doesn&#039;t provide a valueIndex an Array should always be expected so how about this ...
Adding the getValues method and in the getValue method at the beginning use this:

     if (valueIndex &lt; 0) return getValues(key);

That way always an Array is returned if valueIndex was omitted. But then again it is questionable if valueIndex should be an optional or obligatory parameter.
Interesting to mention that your find method is still faster than the getValues method even though they are virtually the same. In fact typing the entry variable inside the for loop provides a small performance boost for my method.</description>
		<content:encoded><![CDATA[<p>Hi Michael, adding a getValues method that always returns an array is a good idea. But it makes me thinking about if in that case changing the getValue method to always return an array makes sense. If the user doesn&#8217;t provide a valueIndex an Array should always be expected so how about this &#8230;<br />
Adding the getValues method and in the getValue method at the beginning use this:</p>
<p>     if (valueIndex < 0) return getValues(key);</p>
<p>That way always an Array is returned if valueIndex was omitted. But then again it is questionable if valueIndex should be an optional or obligatory parameter.<br />
Interesting to mention that your find method is still faster than the getValues method even though they are virtually the same. In fact typing the entry variable inside the for loop provides a small performance boost for my method.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael</title>
		<link>http://blog.hexagonstar.com/as3_multimap_class/comment-page-1/#comment-625</link>
		<dc:creator>Michael</dc:creator>
		<pubDate>Mon, 11 Jun 2007 00:26:03 +0000</pubDate>
		<guid isPermaLink="false">http://blog.hexagonstar.com/actionscript-3-multimap-class/#comment-625</guid>
		<description>ah I forgot to mention, when you omit the valueIndex parameter in the getValue() function and the entry has multiple items you don&#039;t know if the function returns an array or an object/primitive. Maybe it would be better to always return an array (even if it contains only one item) or feed it with an empty array and the function fills out the array elements and instead returns the number of items:
&lt;code&gt;
var data:Array = [];
var numItems:int = getValues(myKey, []);
&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>ah I forgot to mention, when you omit the valueIndex parameter in the getValue() function and the entry has multiple items you don&#8217;t know if the function returns an array or an object/primitive. Maybe it would be better to always return an array (even if it contains only one item) or feed it with an empty array and the function fills out the array elements and instead returns the number of items:<br />
<code><br />
var data:Array = [];<br />
var numItems:int = getValues(myKey, []);<br />
</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael</title>
		<link>http://blog.hexagonstar.com/as3_multimap_class/comment-page-1/#comment-624</link>
		<dc:creator>Michael</dc:creator>
		<pubDate>Sun, 10 Jun 2007 23:38:19 +0000</pubDate>
		<guid isPermaLink="false">http://blog.hexagonstar.com/actionscript-3-multimap-class/#comment-624</guid>
		<description>Nice work :-) Perhaps I would add a function that just retrieves all stored values at a given key perhaps like so:

&lt;code&gt;
public function getValues(key:*):Array
{
    ...
    for (...)
    {
        if (entry.key === key)
        {
            return entry.data;
        }
    }
    return null;
}
&lt;/code&gt;

This would be a a little bit faster when often processing a bunch of values at a key.</description>
		<content:encoded><![CDATA[<p>Nice work <img src='http://blog.hexagonstar.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  Perhaps I would add a function that just retrieves all stored values at a given key perhaps like so:</p>
<p><code><br />
public function getValues(key:*):Array<br />
{<br />
    ...<br />
    for (...)<br />
    {<br />
        if (entry.key === key)<br />
        {<br />
            return entry.data;<br />
        }<br />
    }<br />
    return null;<br />
}<br />
</code></p>
<p>This would be a a little bit faster when often processing a bunch of values at a key.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
