[GiNaC-list] Maps and sets of symbols?

Sheplyakov Alexei varg at theor.jinr.ru
Wed Sep 14 16:44:17 CEST 2005

On Thu, Sep 15, 2005 at 12:12:41AM +1000, John Pye wrote:
> I've got an application I'm working on which needs the ability to handle
> STL maps and sets containing symbols. 

Use std::map<ex, foo, ex_is_less>, see http://www.ginac.de/FAQ.html#stlcontainers

If you _really_ want to use std::map<symbol, foo, ...> 

struct symbol_is_less 
 inline const bool operator()(const symbol& a, const symbol& b)
   return ex_is_less()(a, b);

Best regards,

All science is either physics or stamp collecting.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://www.cebix.net/pipermail/ginac-list/attachments/20050914/9046c86d/attachment.pgp

More information about the GiNaC-list mailing list