Example #1
0
node::node (const node& inNode)
{
    priority = inNode.getPriority();
    value = inNode.getValue();
    size = inNode.getSize();
    sum = inNode.getSum();
    max = inNode.getMax();
    min = inNode.getMin();
    isIncreasing = inNode.getIsIncreas();
    isDecreasing = inNode.getIsDecreas();
    needToRev = inNode.getNeedToRev();

    left = inNode.getLeft();
    right = inNode.getRight();
}
Example #2
0
/*!
 * Surcharge de l'opérateur < sur des nodes, pour comparer leurs priorites
 */
bool operator<(const node & a, const node & b)
{
    return a.getPriority() > b.getPriority();
}