I agree with Alexei, here is a similar example that I put together some time ago using Python, perhaps a high level script would be a better tool for the job!<br><br>Enjoy.<br><br>Alex<br><br><a href="http://www.alexfb.com/cgi-bin/twiki/view/PtPhysics/Adjacency-Matrix-EigenVectore-Path-Graph" target="_blank">http://www.alexfb.com/cgi-bin/twiki/view/PtPhysics/Adjacency-Matrix-EigenVectore-Path-Graph</a><br>
<br><div class="gmail_quote">2008/5/23 Alexei Sheplyakov &lt;<a href="mailto:varg@theor.jinr.ru">varg@theor.jinr.ru</a>&gt;:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hello!<br>
<div class="Ih2E3d"><br>
On Fri, May 23, 2008 at 12:47:55AM -0700, Bhalchandra Thatte wrote:<br>
<br>
&gt; I wish to write a few programs that do something like this:<br>
&gt; take a graph or a tree<br>
&gt; each vertex or edge of the graph has a variable associated with it.<br>
&gt; walk on the graph or find certain subgraphs, and compute certain<br>
&gt; multivariable polynomials in terms of the variables associated<br>
&gt; with vertices or edges.<br>
<br>
</div>I think boost.graph (for graph manipulations) and GiNaC (for symbolic<br>
computation) is a reasonable choice.<br>
<div class="Ih2E3d"><br>
&gt; later possibly do numerical optimization of the polynomials using<br>
&gt; an optimization library.<br>
<br>
</div>Be forewarned: GiNaC does not provide any kind of numerical optimization.<br>
<div class="Ih2E3d"><br>
&gt; I thought GiNaC would be ideal for this type of applications because<br>
&gt; C++ will give me complete control over the data structures and<br>
&gt; the efficiency.<br>
<br>
</div>I suggest to think twice if you really need a low level programming<br>
language (such as C++) at all.<br>
<br>
Best regards,<br>
 &nbsp; &nbsp; &nbsp; &nbsp;Alexei<br>
<font color="#888888"><br>
--<br>
</font><div><div></div><div class="Wj3C7c">All science is either physics or stamp collecting.<br>
<br>
</div></div><br>-----BEGIN PGP SIGNATURE-----<br>
Version: GnuPG v1.4.6 (GNU/Linux)<br>
<br>
iQIVAwUBSDaEzyXMWnuYxRVqAQL7XxAAok3ywm5yWWvGwSOI/XMCIE3Y7j23Q9td<br>
DH8TEX5hIt1kzASA33iaDsWVkvBPRyWPGTF6AJLOvnyOLX1LHcB0Q8F+ojfKmVIw<br>
o2raKOltLYO4oDB8K/edUtfLlUrLv7r688t6qdBBzDmxfbMQ/4/W32hioMvzr9yh<br>
isWgXIjBV/FV86D2hVF/q7PvbloulHVyxH3TwINkmyItaygfToaS5OyDJVdBeKbv<br>
SJ0gbqEKNkyWZ/4ZIZeJ0ckkOhP/fIDGO04YqVKrLUwy7Q1UZuuti3i92Vosr+Yb<br>
m7x7v5yZk0J/3W/S1x+ZOl/1tt8UVacAc9maIlQXM9kH0B8wG7vQCHHNKZ6XzHtN<br>
krUxNxw7ciWz4WY0tXg2vzePzMCzVN3nfaWLJ9Fznt3VPPDYuFfWQmsS7zPXXOS9<br>
nHkmM9pSZ4wR8nLDZAmIH36J9QMmImx9d/T91na3tAhKm1/4Q/3uO1SLHahIgCcj<br>
dYkA8F1GWR082XlBqnWoISwlJjv1ZqNFsjISllixYk24+MvtODHohDEJnEUsAoWg<br>
jdol4XxpZS3UAGa+Cy7xpzC1iOpksEmG/3zQaI9QUI8GXdnXfM1noeAGDnH/JeF8<br>
aEsu5Z6Wva3iZYBFj3SM/mnFqleumt6Jf4YBMDYiohQG5RoQCtQ4k/DjSED1JZiP<br>
gx4tfNdbA9A=<br>
=HgPN<br>
-----END PGP SIGNATURE-----<br>
<br>_______________________________________________<br>
GiNaC-list mailing list<br>
<a href="mailto:GiNaC-list@ginac.de">GiNaC-list@ginac.de</a><br>
<a href="https://www.cebix.net/mailman/listinfo/ginac-list" target="_blank">https://www.cebix.net/mailman/listinfo/ginac-list</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Mobile: 07788 872118<br>Blog: <a href="http://www.alexfb.com">www.alexfb.com</a><br><br>--<br>All science is either physics or stamp collecting.