Use a Graph Library/Node Network Library or Write My Own?

后端 未结 9 1846
逝去的感伤
逝去的感伤 2020-12-23 22:23

I\'m trying to decide between going with a pre-made graph/node network library or to roll my own.

I\'m implementing some graph search algorithms which might require

9条回答
  •  天涯浪人
    2020-12-23 23:04

    This really isn't a concise answer, its more of adding to what has already been said.

    The solution to this problem depends on the context of the problem. If you wish to get a great understanding how graph algorithms, and software works. Write your own. If you want to get an advanced knowledge of graph algorithms and structures or to implement them into your own program then learn a standard graph library. (See the reasons for using reusable code)

    The best of both worlds. Do both. If you are stretched for time, get a book on this or follow tutorials and the examples.

    Another suggestion: Ask a new pointed question about what is the {best, most reliable, easiest to learn} graph library for {describe a very general problem}? This will help you choose what to learn, rather than trying at random to find the best one that suits your needs. Someone has already seen this problem, ask for advice.

    Using Reusable Code:

    1. Code that someone else has written including test cases will generally be more reliable than your own.
    2. Fixes are easer to implement (with updates to the component you are reusing), this is true in Boost (since they do frequent updates, and that Boost is peer reviewed).
    3. Once you learn one framework you can apply that to other applications... who knows you might get a job later in life using the framework. Companies like reusing rather than reinventing the wheel.

提交回复
热议问题