Public Member Functions

GiaMessageBookkeeping::GiaNodeQueueCompare Class Reference

#include <GiaMessageBookkeeping.h>

List of all members.

Public Member Functions

bool operator() (const FullGiaNodeInfo &x, const FullGiaNodeInfo &y)

Detailed Description

Definition at line 96 of file GiaMessageBookkeeping.h.


Member Function Documentation

bool GiaMessageBookkeeping::GiaNodeQueueCompare::operator() ( const FullGiaNodeInfo x,
const FullGiaNodeInfo y 
)

Definition at line 137 of file GiaMessageBookkeeping.cc.

{
    if (x.info->receivedTokens > y.info->receivedTokens) {
        if (y.info->receivedTokens == 0)
            return false;
        else {
            if (x.node.getCapacity() >= y.node.getCapacity())
                return false;
            else
                return true;
        }
    }
    else if (x.info->receivedTokens < y.info->receivedTokens) {
        if (x.info->receivedTokens == 0)
            return true;
        else {
            if (x.node.getCapacity() > y.node.getCapacity())
                return false;
            else
                return true;
        }
    }
    else {
        if (x.info->receivedTokens == 0)
            return true;
        else {
            if (x.node.getCapacity() > y.node.getCapacity())
                return false;
            else
                return true;
        }
    }
}


The documentation for this class was generated from the following files: