48 #ifdef CHECK_MEMORY_LEAKS
50 #endif // CHECK_MEMORY_LEAKS
81 if ((*ni)->samePos(xID, yID)) {
91 for (
int ix = 0; ix < numX; ix++) {
92 for (
int iy = 0; iy < numY; iy++) {
94 std::string nodeID = toString<int>(ix) +
"/" + toString<int>(iy);
96 node->
setX(ix * spaceX + attachLength);
97 node->
setY(iy * spaceY + attachLength);
108 if (attachLength > 0.0) {
109 for (
int ix = 0; ix < numX; ix++) {
111 NGNode* topNode =
new NGNode(
"top" + toString<int>(ix), ix, numY);
112 NGNode* bottomNode =
new NGNode(
"bottom" + toString<int>(ix), ix, numY + 1);
113 topNode->
setX(ix * spaceX + attachLength);
114 bottomNode->
setX(ix * spaceX + attachLength);
115 topNode->
setY((numY - 1) * spaceY + 2 * attachLength);
123 for (
int iy = 0; iy < numY; iy++) {
125 NGNode* leftNode =
new NGNode(
"left" + toString<int>(iy), numX, iy);
126 NGNode* rightNode =
new NGNode(
"right" + toString<int>(iy), numX + 1, iy);
128 rightNode->
setX((numX - 1) * spaceX + 2 * attachLength);
129 leftNode->
setY(iy * spaceY + attachLength);
130 rightNode->
setY(iy * spaceY + attachLength);
143 return cos(phi) * radius;
149 return sin(phi) * radius;
158 if (numCircles < 1) {
165 for (ir = 1; ir < numRadDiv + 1; ir++) {
166 for (ic = 1; ic < numCircles + 1; ic++) {
169 toString<int>(ir) +
"/" + toString<int>(ic), ir, ic);
180 if (ir == numRadDiv) {
192 for (ir = 1; ir < numRadDiv + 1; ir++) {
201 std::string id1 = node1->
getID() +
"to" + node2->
getID();
202 std::string id2 = node2->
getID() +
"to" + node1->
getID();
212 std::vector<NBNode*> nodes;
215 nodes.push_back(node);
224 for (std::vector<NBNode*>::const_iterator i = nodes.begin(); i != nodes.end(); ++i) {
227 for (EdgeVector::const_iterator j = incoming.begin(); j != incoming.end(); ++j) {
229 NBEdge* back =
new NBEdge(
"-" + (*j)->getID(), node, (*j)->getFromNode(),