Test tree creation using the new TreeManip
class.
Modify your main.cpp file to look like this:
#include <iostream>
#include "node.hpp"
#include "tree.hpp"
#include "tree_manip.hpp"
using namespace strom;
const double Node::_smallest_edge_length = 1.0e-12;
int main(int argc, const char * argv[]) {
std::cout << "Starting..." << std::endl;
TreeManip tm;
tm.createTestTree();
std::cout << "\nFinished!" << std::endl;
return 0;
}
All we’ve done differently is to create a TreeManip
object and call its createTestTree()
function, whereas previously we constructed a Tree
object that called Tree::createTestTree()
function in its constructor.
Try compiling and running the program now. The output is the same as before, except for two additional lines generated by the TreeManip
constructor and destructor.