[Haskell-cafe] Is the following implemented by a sparse matrix representation? type Graph n w = Array (n, n) (Maybe w)

KC kc1956 at gmail.com
Wed Jul 10 18:27:17 CEST 2013


Thank you :)


On Wed, Jul 10, 2013 at 8:33 AM, Twan van Laarhoven <twanvl at gmail.com>wrote:

> The standard array types, such as "Array (n,n) (Maybe w)" will be
> implemented as a dense array. If you want to use a sparse matrix, you will
> explicitly have to ask for it. For instance by using something like "IntMap
> (IntMap w)" or "Map (n,n) w" or "Array n (IntMap w)". Each of these
> representations is slightly different, and there will be different
> trade-offs.
>
>
> Twan
>
> On 09/07/13 23:26, KC wrote:
> > Is the following implemented by a sparse matrix representation?
>
>  type Graph n w = Array (n,n) (Maybe w)
>>
>> --
>> --
>> Regards,
>> KC
>>
>
>
>
> ______________________________**_________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/**mailman/listinfo/haskell-cafe<http://www.haskell.org/mailman/listinfo/haskell-cafe>
>



-- 
--
Regards,
KC
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20130710/c77ac00e/attachment.htm>


More information about the Haskell-Cafe mailing list