Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

8
  • 2
    Why does DynamicTree extend ProbabilityTree if they are unrelated? Commented Aug 14, 2012 at 13:20
  • 1
    @Baqueta good question, I need trees that support both random selection of nodes, as provided by ProbabilityTree, and that dynamically grow when an yet unexisting node is requested, as provided by DynamicTree. To have both capabilities in the first design DynamicTree extends ProbabilityTree. Commented Aug 14, 2012 at 13:34
  • 2
    How about just putting the functionality shared by both ProbabilityTree and DynamicTree into a new interface? Commented Aug 14, 2012 at 13:54
  • 2
    I think I'm failing to understand why the DynamicTree and ProbabilityTree concepts are unrelated when it sounds like you want DynamicTree to be a specialised type of ProbabilityTree. Are you thinking that at some point you might have a variant of DynamicTree which isn't a ProbabilityTree? Commented Aug 14, 2012 at 14:23
  • 2
    I think that's a good idea - YAGNI should be applied here :-) Commented Aug 14, 2012 at 15:08