C/C++ Library for dynamic graphs? [closed] - c++

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
I'm looking for a library to operate on dynamical graphs. I have a simulation where I must repeatedly calculate the average geodesic length for a graph after doing some changes in its structure (adding and deleting edges, on an undirected graph, all edges have the same weights).
I was using a quick C++ wrap over igraph that I made. igraph is for static graphs, so I was recalculating the geodesic distances from scratch every time I changed the graph. It's a monte carlo simulation, so I must do this millions of times to recover some statistics. It's starting to get real slow.
So I looked for libraries with algorithms for dynamical graphs, that could recalculate just update the average length after I delete or add an edge. I found some papers on the subject, but I'm really no specialist (I'm just a physicist, I'm just incidentally using graphs on a problem... I have almost no knowledge of data structures and algorithms) so I can't even read the papers, let alone implement the algorithms.
I found this library LEDA (http://www.algorithmic-solutions.com/leda/) which seems to have a dynamic graph extension, but it seems to be unmaintained (the links to download the free version are broken) and it's proprietary.
Are there any alternatives? I'm looking for C/C++ libraries. Maybe Haskell if I must, and I'm absolutely desperate.

Since you're doing Monte Carlo anyway, I assume that it would be acceptable to approximate the average shortest-path length. At each step, you could sample a handful of nodes and report the average shortest-path length for paths starting at one of those nodes, which has the same expectation and hopefully reasonable variance.
Alternatively, reference [3] of the JACM paper you mentioned on dynamic shortest-paths is an experimental study from 2004; perhaps the authors would let you use their code.

I know this late, but have you looked at LEMON?

Have you looked at Boost Graph Library
I haven't used it myself, but as part of Boost you can expect it to be very high quality, but it will demand a measure of C++ expertise.

Related

C++ library to obtain regular meshes from a 3D file format such as STL [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
It seems there are some libraries including CGAL to generate meshes from a 2D or 3D model.
Question: In C++ environment, what is the best way to obtain a set of regular nodes to represent an object that is given by a 3d file format such as the STL?
To explain the question, let me provide an example. In a 2D case, a square can be represented by the set of '1's and the empty space can be by the set of '0's.
Is there any C++ library that can deal with this task?
00000000000000
00000111000000
00000111000000
00000111000000
00000000000000
Thank you in advance.
CGAL it self is already a very good option, if you can match the licenses (many modules are GPL or must pay a fee for proprietary use). This answer shows an example of use.
Another complete library is the Point Clouds Library (PCL) (license compatible with commercial). If your input data is ordered (like the one shown in the question) you can use the pcl::OrganizedFastMesh class.
If your data is un-ordered,
then a pcl::GreedyProjectionTriangulation may be better.
Finally, if using PCL, you can save your triangle mesh to STL using [pcl::io::savePolygonFileSTL](http://docs.pointclouds.org/1.7.0/group__io.html#ga3223bdca3003262efbd8c475d4ab7cc6].
As a final note, better than trying to find a library that exactly matches your input format, find a library that can generate the result you want and then accommodate your input and output to it through convertors. Of course, if your input doesn't provide the required data, such as normals, then you must either compute it previously or search for another method ;).

Heat Conduction 2D Fourier libmesh / deal.II [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
are there any examples of solving heat conduction problems in 2D with fourier's law as main equation with finite elements and using either libmesh or deal.II libraries?
The 2D heat equation is the only way to solve heat conduction problems. Lots of examples using finite difference, finite element, and boundary element methods. All require meshes of some kind. Which one do you want to apply?
OK, so now we know you want to solve 2D heat conduction problems using FEA. It's a three step process:
Pre-process (create the mesh for your geometry, apply material properties, boundary conditions, and initial conditions (if transient or non-linear).
Perform the analysis (formulate and solve the matrix equations for node and element unknowns).
Post-process (graphical display of results is best, since pictures are worth thousands of words).
Which solver do you wish to use? Is your objective to write one or just use one? Do you want open source? Must it be written in C++? (Not likely. FORTRAN is by far the most common language for such programs.)
Is yours a large problem? I'm guessing no, but massive parallelization might be of interest to you:
http://www.cas.usf.edu/~cconnor/parallel/2dheat/2dheat.html
FEMHub likes Python, probably because of the nice libraries NumPy and SciPy.
Here's a site that lists open source libraries for Java.

Library for Trust-Region Reflective algorithms in C [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
I'm trying to rebuild some Matlab code in C that uses their fsolve function. From the documentation it's using a "trust region reflective" algorithm (I already built it using a Levenberg-marquardt algorithm and it's converging completely differently). Can anyone recommend a library for doing this type of optimization in C/C++ ?
Not sure what "reflective" adds to the "trust region" definition. However, Knitro is a powerful trust-region interior-point optimizer with a C/C++ interface. Unfortunately, Knitro is only available without cost in a limited edition for students; the full version requires a commercial license.
There is also Ipopt, which is not trust-region but nevertheless a powerful C/C++ based large-scale nonlinear constrained optimization engine with an open-source license.
Have you tried checking if your function is convex, if LM and some other convex optimization algorithm converge differently, there is a good chance that the base function is not convex. Also have you checked if the cost function is at least of order 2. If this is the case minimizing the square of the cost function can be better than minimizing the cost function alone.
There are two types of general-purpose algorithms for which there is a global convergence guarantee (under standard assumptions, don't ask :) ). These methods are the line search and the trust region methods. If you wish, you can read more on this topic in the book of Nocedal-Wright: Numerical Optimization.
I haven't tried Knitro recently.
Ipopt is the most robust solver among those I have tried, I highly recommend it. It implements the line search method and is written in C++.

Mesh triangulation and simplification C++ library [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 months ago.
Improve this question
I am looking for a C++ library to triangulate and simplify 3D mesh. My 3D meshes are potentially huge (around 3 millions vertices). It should ideally be open source. Any idea?
Here are some libraries I found:
1) CGAL
++ Does a lot of things;
-- Licensing issues;
2) GTS
++ Open source and quite easy to use;
-- Does less that CGAL
anymore ideas?
vcglib (http://www.vcglib.net) is a open source c++ mesh processing library that offers high quality simplification.
vcglib is the library behind MeshLab (http://www.meshlab.net) so if you find some mesh processing feature in meshlab you will probably find that feature in the vcglib
I am looking for a C++ library to triangulate and simplify 3D mesh.
In addition to the libraries suggested in other answers, I would suggest looking at open-source MeshLib C++ library, which contains very fast and precise decimation functions, see documentation. The implemented algorithm there is based on Surface Simplification Using Quadric Error Metrics article with several improvements and optimizations.
My 3D meshes are potentially huge (around 3 millions vertices).
On top of that, there is a parallel version of mesh simplification specially tailored for such huge meshes. It splits the surface on smaller parts, decimates them concurrently, then merges them again, and decimates the triangles near part boundaries to avoid any visible seams, see MR::decimateParallelMesh() function.

advance mathematics c++ libraries [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
what popular advance mathematics libraries for c++ are present out there, so that they can be used as a 1 stop solution and avoiding reinventing the wheel ?
Check out GNU Scientific Library -- it's in C, but I use it all the time to avoid re-writing the Numerical Recipes code.
Intel's MKL (Math Kernel Library) is to be looked at especially if doing large scale matrix operations; it's C based, but should not really be an issue IMO.
Other than that, maybe the boost math library could be interesting as it is free. (but I have no experience with it, so YMMV).
Max.
Like others have said, you will probably not find a single library to handle all of the areas you listed. For matrix algebra, I've heard good things about the Eigen C++ library from coworkers who are using it.
For commercial libraries, both NAG (Numerical Algorithms Group, http://www.nag.co.uk/) and IMSL ( http://www.vni.com/products/imsl/ ) are standards and provide industrial-strength numerical analysis algorithms.
look through the list and mix-and-match. You want very many things, unlikely any single package is going to do them all.
http://www.oonumerics.org/
octave is the only one that is going to be more or less comprehensive (functionality comparable/clone to Matlab)
http://www.mathias-michel.de/download/howto-octave-c++.ps
For group theory there is GAP.