You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to biopp-de...@googlegroups.com
Hi,
I want to exploit the clonability of some objects in a Tree. Is it fine with any of you if I change TreeTemplateTools.h like this?
template<class N> static N* cloneSubtree(const Node& node) { // First we copy this node using default copy constuctor: N* clone;
// previous version : clone = new N(node);
if (dynamic_cast<const Clonable*>(&node)==0) clone = new N(node); else clone = dynamic_cast<const N*>(&node)->clone();
// We remove the link toward the father: // clone->removeFather();
// Now we perform a hard copy: for (int i = 0; i < static_cast<int>(node.getNumberOfSons()); i++) { clone->addSon(cloneSubtree<N>(*node[i])); } return clone; }
Or is there a problem I missed?
Cheers, Laurent
Julien Yann Dutheil
unread,
Nov 18, 2014, 9:32:42 AM11/18/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to biopp-de...@googlegroups.com
Definitely fine and needed. I cannot see any issue with that.