49 #ifdef CHECK_MEMORY_LEAKS
51 #endif // CHECK_MEMORY_LEAKS
82 if ((*ni)->samePos(xID, yID)) {
92 for (
int ix = 0; ix < numX; ix++) {
93 for (
int iy = 0; iy < numY; iy++) {
95 std::string nodeID = toString<int>(ix) +
"/" + toString<int>(iy);
97 node->
setX(ix * spaceX + attachLength);
98 node->
setY(iy * spaceY + attachLength);
109 if (attachLength > 0.0) {
110 for (
int ix = 0; ix < numX; ix++) {
112 NGNode* topNode =
new NGNode(
"top" + toString<int>(ix), ix, numY);
113 NGNode* bottomNode =
new NGNode(
"bottom" + toString<int>(ix), ix, numY + 1);
114 topNode->
setX(ix * spaceX + attachLength);
115 bottomNode->
setX(ix * spaceX + attachLength);
116 topNode->
setY((numY - 1) * spaceY + 2 * attachLength);
124 for (
int iy = 0; iy < numY; iy++) {
126 NGNode* leftNode =
new NGNode(
"left" + toString<int>(iy), numX, iy);
127 NGNode* rightNode =
new NGNode(
"right" + toString<int>(iy), numX + 1, iy);
129 rightNode->
setX((numX - 1) * spaceX + 2 * attachLength);
130 leftNode->
setY(iy * spaceY + attachLength);
131 rightNode->
setY(iy * spaceY + attachLength);
144 return cos(phi) * radius;
150 return sin(phi) * radius;
159 if (numCircles < 1) {
166 for (ir = 1; ir < numRadDiv + 1; ir++) {
167 for (ic = 1; ic < numCircles + 1; ic++) {
170 toString<int>(ir) +
"/" + toString<int>(ic), ir, ic);
181 if (ir == numRadDiv) {
193 for (ir = 1; ir < numRadDiv + 1; ir++) {
202 std::string id1 = node1->
getID() +
"to" + node2->
getID();
203 std::string id2 = node2->
getID() +
"to" + node1->
getID();
213 std::vector<NBNode*> nodes;
216 nodes.push_back(node);
225 for (std::vector<NBNode*>::const_iterator i = nodes.begin(); i != nodes.end(); ++i) {
228 for (EdgeVector::const_iterator j = incoming.begin(); j != incoming.end(); ++j) {
230 NBEdge* back =
new NBEdge(
"-" + (*j)->getID(), node, (*j)->getFromNode(),