FACT++  1.0
Huffman::TreeNode::TreeNode ( TreeNode n0 = 0,
TreeNode n1 = 0 
)
inline

Definition at line 43 of file huffman.h.

References count, one, parent, and zero.

43  : parent(0), isLeaf(false)
44  {
45  count = n0 && n1 ? n0->count + n1->count : 0;
46  zero = n0 && n1 ? (n0->count > n1->count ? n0 : n1) : NULL;
47  one = n0 && n1 ? (n0->count > n1->count ? n1 : n0) : NULL;
48 
49  if (n0)
50  n0->parent = this;
51 
52  if (n1)
53  n1->parent = this;
54  }
TreeNode * zero
Definition: huffman.h:29
TreeNode * parent
Definition: huffman.h:24
size_t count
Definition: huffman.h:34
TreeNode * one
Definition: huffman.h:29