title: Pointer-based binary heap
body: <p>I am going to implement a <em>pointer-based binary heap</em>. What i would like, is for the heap to "work" in various ways depending on some parameters. For example, the heap could be represented in many ways: pointers to left child, right child and parent, left child/right sibling style and so on. Independent of representation, i would like the basic implementation to stay the same. For example, i would like not to implement two different <em>Siftdown</em> methods, depending on the representation. I was thinking about giving a node type and an iterator type as parameters to the heap. Then, <em>Siftdown</em>, say, could use the given iterator to do it's job. Im wondering if it's good style to use iterators in actual implementation code? Also, i am looking into known <em>design patterns</em> that might be useful to me. The <em>Bridge</em> and <em>Strategy</em> patterns seem interesting.     </p>
  
  <p>So, my question is twofold:</p>
  
  <ol>
  <li>Is it good practice to use iterators in implementation code?</li>
  <li>Any thoughts on design patterns that would fit my purpose?</li>
  </ol>
  
  <p>Thanks.</p>