lib/jumoku/builders/shared.rb
# Removes a node from the tree.
#
# You cannot remove non terminal nodes as it would break the
# connectivity constraint of the tree.
#
# I may add an option which would allow to force removal
# of internal nodes and return two new trees from this
# destructive operation.
#
# @param [node] u
# @return [RawTree] self
Removes a node from the tree.
You cannot remove non terminal nodes as it would break the
connectivity constraint of the tree.

I may add an option which would allow to force removal
of internal nodes and return two new trees from this
destructive operation.
Removes a node from the tree . You cannot remove non terminal nodes as it would break the connectivity constraint of the tree . I may add an option which would allow to force removal of internal nodes and return two new trees from this destructive operation .
def remove_node!(u, force = false)
      if force || terminal?(u)
        remove_vertex! u
      else
        raise UndefinedNode, "Can't remove a non terminal node in a tree"
      end
    end
def remove_node! ( u , force = false ) if force || terminal? ( u ) remove_vertex! u else raise UndefinedNode , "Can't remove a non terminal node in a tree" end end
Removes a node from the tree.
Removes a node from the tree .
# Ensure the connected constraint.
None
RawTree
u
<not_specific>
force
<not_specific>
<not_specific>
None