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