-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Plans for cookbook 2 #3
Comments
Use
|
Well, book 1 does use .dot files to import graphs, for the same reasons as you listed. The functions are called |
Oh, my question is not about the dot file importing. It's about how to do testing properly. If we have a very complicated example(a large graph), how do we know our algorithm is correct? |
I always follow these steps:
In my tests, one can see I do so for graphs of increasing complexity. I do Test-Driven Development to write exactly as much tests as needed. |
That's the difficult part. I mean, for a maze like this, how do you get expected result? I joined Robert Sedgewick's Maybe we don't want to just copy his tests to our repo, but we can use his tests to verify the correctness of our algorithm first, and create new tests by hand. But I have to go through his course again. It's written in Java, and I haven't touched Java for quite some time. |
There may be even better ways, but I always setup the expected results by hand. Yes, this is tedious, but there is AFAIK no other way to properly test code. Also with mazes, I'd go up in complexity gradually. And of course re-use mazes (and their results). |
... and I volunteer to wrote those tests as well. When we both have found our ways within Cookbook 2 (I take great effort to strip everything except the most relevant), I volunteer to prove your function works. |
We will see how it goes. I like SedgeWick's example. It has graph as small as 10 edges, and as large as 700K edges. His algorithm has been verified by millions of people. I want to use it as a start. |
Of course, I am happy to accept whatever tests you come up with. More tests are definitely better. |
Sounds like a solid plan. I can but guess what algorithms you plan to create, so assign me to create tests when your algorithms are in place. OK? |
Yeah. Sure. |
Hi! |
BGL has quite a number of alogorithms. It will take sometime to cover all of them.
To keep things going on, I am going to create a to_do_list file to:
We need good examples for algorithms, or even better, real world examples. For example,
Fortunately, wikipedia has a
Applications
section for algorithms. We will steal examples from it, and make them more descriptive.The text was updated successfully, but these errors were encountered: