My Project
Loading...
Searching...
No Matches
CompareNode Struct Reference

Comparator used by the priority queue to order nodes by frequency. More...

#include <Huffman.h>

Public Member Functions

bool operator() (Node *const &n1, Node *const &n2)
 Compares two nodes based on their frequencies.

Detailed Description

Comparator used by the priority queue to order nodes by frequency.

Member Function Documentation

◆ operator()()

bool CompareNode::operator() ( Node *const & n1,
Node *const & n2 )
inline

Compares two nodes based on their frequencies.

Returns
True if n1 has a greater frequency than n2 (min-heap logic).

The documentation for this struct was generated from the following file: