     super ctx, idx, t
     
 
-class ShannonFanoNodeCollection extends NodeCollection
+class ShannonFanoNodeCollection extends WeightedNodeCollection
   constructor: (shape) ->
     super shape
 


    @addAnimations([new CollectionAnimation(anims, -1)])

  removeValues: () ->
    rvFn = (node) ->
      if node.value?
        node.saved_value = node.value
      delete node.value

    for n in @nodes
      n.forAll(rvFn)

class HuffmanNodeCollection extends NodeCollection
  constructor: (shape) ->
    super shape


    action: (c, t) ->
      console.log('finish Huffman')
      # TODO: maybe first this should automatically finish the construction?
      c.reconstruct_as = WeightedNodeCollection
  }
]

