[Lemon-user] Yet another question/problem

Balázs Dezső deba.mf at gmail.com
Tue Apr 17 16:59:44 CEST 2012


Hi,

It's not possible, since graphs are generally not copy-constructible
in LEMON, and maps need copy-constructible value types.
If you want to store graph in the nodes, then I recommend to use
ListGraph* as the value type of the map.

Balazs


On Tue, Apr 17, 2012 at 4:39 PM, Todorov, Vladimir
<vladimir.todorov at intel.com> wrote:
> Hi,
>
>
>
> Is it not possible to have a map on a graph, which contains Graphs as the
> values pointed by the nodes of the first graph?
>
>
>
> Somehow I end up with this error:
>
>
>
> /local/include/lemon/list_graph.h: In constructor 'lemon::ArrayMap<_Graph,
> _Item, _Value>::ArrayMap(const _Graph&) [with _Graph =
> lemon::GraphExtender<lemon::ListGraphBase>, _Item =
> lemon::ListGraphBase::Node, _Value = lemon::ListGraph]':
>
> /local/include/lemon/bits/default_map.h:164:   instantiated from
> 'lemon::DefaultMap<_Graph, _Item, _Value>::DefaultMap(const typename
> lemon::DefaultMapSelector<_Graph, _Item, _Value>::Map::GraphType&) [with
> _Graph = lemon::GraphExtender<lemon::ListGraphBase>, _Item =
> lemon::ListGraphBase::Node, _Value = lemon::ListGraph]'
>
> /home/ipr_asco.work/todorovv/local/include/lemon/bits/map_extender.h:63:
> instantiated from 'lemon::MapExtender<_Map>::MapExtender(const typename
> _Map::GraphType&) [with _Map =
> lemon::DefaultMap<lemon::GraphExtender<lemon::ListGraphBase>,
> lemon::ListGraphBase::Node, lemon::ListGraph>]'
>
> /home/ipr_asco.work/todorovv/local/include/lemon/bits/graph_extender.h:608:
> instantiated from
> 'lemon::GraphExtender<Base>::NodeMap<_Value>::NodeMap(const
> lemon::GraphExtender<Base>&) [with _Value = lemon::ListGraph, Base =
> lemon::ListGraphBase]'
>
> ../sta/KruskalLinkConstructor.cpp:252:   instantiated from here
>
> /home/ipr_asco.work/todorovv/local/include/lemon/list_graph.h:1201: error:
> 'lemon::ListGraph::ListGraph(const lemon::ListGraph&)' is private
>
> /home/ipr_asco.work/todorovv/local/include/lemon/bits/array_map.h:91: error:
> within this context
>
> /home/ipr_asco.work/todorovv/local/include/lemon/list_graph.h: In member
> function 'void __gnu_cxx::new_allocator<_Tp>::construct(_Tp*, const _Tp&)
> [with _Tp = lemon::ListGraph]':
>
> /home/ipr_asco.work/todorovv/local/include/lemon/bits/array_map.h:91:
> instantiated from 'lemon::ArrayMap<_Graph, _Item, _Value>::ArrayMap(const
> _Graph&) [with _Graph = lemon::GraphExtender<lemon::ListGraphBase>, _Item =
> lemon::ListGraphBase::Node, _Value = lemon::ListGraph]'  …………………..
>
>
>
>
>
> Regards,
>
>
>
> Vladimir
>
>
>
> Vladimir Todorov
>
> Intel Mobile Communications
>
> IP & Reuse
>
> Tel: +49 (0)89 99 8853-29088
>
> Fax: +49 (0)89 99 8853-955 54 39
>
> vladimir.todorov at intel.com
>
> VISIT US AT: http://www.intel.com
>
> Address:
>
> Intel Mobile Communications GmbH
>
> Am Campeon 10-12
>
> 85579 Neubiberg
>
> Germany
>
> Intel Mobile Communications GmbH
>
> Managing Directors: Prof. Dr. Hermann Eul (Chairman), Christin Eisenschmid
>
> Registered Office: Neubiberg
>
> Commercial Register: Amtsgericht München HRB 186928
>
> „This e-mail and any attachments are confidential and may be subject to
> legal or some
>
> other professional privilege. They are intended solely for the attention and
> use of the named
>
> addressee(s). If you are not the named addressee(s) you must not use,
> disclose, retain or reproduce
>
> all or any part of the information contained in this e-mail or any
> attachments. Any unauthorized
>
> use or disclosure may be unlawful. If you have received this e-mail by
> mistake, please
>
> inform the sender immediately and delete it and all copies from your system
> and destroy any
>
> hard copies of it.“
>
>
>
>
> _______________________________________________
> Lemon-user mailing list
> Lemon-user at lemon.cs.elte.hu
> http://lemon.cs.elte.hu/mailman/listinfo/lemon-user
>



More information about the Lemon-user mailing list