#include <GiaMessageBookkeeping.h>
Public Member Functions | |
bool | operator() (const FullGiaNodeInfo &x, const FullGiaNodeInfo &y) |
bool GiaMessageBookkeeping::GiaNodeQueueCompare::operator() | ( | const FullGiaNodeInfo & | x, | |
const FullGiaNodeInfo & | y | |||
) |
00139 { 00140 if (x.info->receivedTokens > y.info->receivedTokens) { 00141 if (y.info->receivedTokens == 0) 00142 return false; 00143 else { 00144 if (x.node.getCapacity() >= y.node.getCapacity()) 00145 return false; 00146 else 00147 return true; 00148 } 00149 } 00150 else if (x.info->receivedTokens < y.info->receivedTokens) { 00151 if (x.info->receivedTokens == 0) 00152 return true; 00153 else { 00154 if (x.node.getCapacity() > y.node.getCapacity()) 00155 return false; 00156 else 00157 return true; 00158 } 00159 } 00160 else { 00161 if (x.info->receivedTokens == 0) 00162 return true; 00163 else { 00164 if (x.node.getCapacity() > y.node.getCapacity()) 00165 return false; 00166 else 00167 return true; 00168 } 00169 } 00170 }