Shows how can this library be used within R.
#include <Rcpp.h>
#include "../include/pruner.hpp"  
using namespace Rcpp; 
class TreeData {
  int nnodes;
public:
  
  ~TreeData() {};
  TreeData(int n): nnodes(n) {};
  
  int get_nnodes() {return this->nnodes;};
  void set_nnodes(int n) {
    this->nnodes = n;
    return;
  };
};
void myfunction(
    TreeData * a,
  ) {
  
  
  printf(
"Currently sitting on the node %i.\nCurrent parents are: ", iter.
id());
    printf(" %i", *i);
  }
  printf("\n");
  
  printf(
"Currently sitting on the node %i.\nCurrent parents are: ", iter.
id());
    printf(" %i", *i);
  }
  printf("\n");
  return;
}
  
  
  uint ans;
  
  
  mytree.
args = 
new TreeData(1);
  
  
  mytree.
args->set_nnodes(5);
  
  
  
  List res = List::create(
    _[
"edgelist"]  = mytree.
get_edgelist(),
    _[
"postorder"] = mytree.
get_postorder(),
    _[
"dag"]       = mytree.
is_dag()
  );
  
  
  return res;
  
}