#include <LatticeBase.h>
Inheritance diagram for LatticeBase:

|
|
Definition at line 84 of file LatticeBase.h. |
|
|
Definition at line 91 of file LatticeBase.h. Referenced by addLeftNodeToLink(), addRightNodeToLink(), and leftNode(). |
|
|
Reimplemented in Lattice. Definition at line 81 of file LatticeBase.h. Referenced by addLeftNodeToLink(), checkLNtopo(), connect(), linkGivenLeft(), linksGivenLeft(), newLeftNode(), vLeftGivenLeft(), and vRightGivenLeft(). |
|
|
Definition at line 309 of file LatticeBase.h. Referenced by LatticeBase(). |
|
|
Reimplemented in Lattice. Definition at line 80 of file LatticeBase.h. Referenced by addLeftNodeToLink(), addRightNodeToLink(), checkLLtopo(), checkRLtopo(), cLshared(), connect(), removeLink(), showLink(), sLLshared(), and sLRshared(). |
|
|
Definition at line 79 of file LatticeBase.h. Referenced by connect(). |
|
|
Definition at line 93 of file LatticeBase.h. Referenced by cLshared(), connectLinks(), shareLinksLeft(), shareLinksRight(), show(), sLLshared(), sLRshared(), and ~LatticeBase(). |
|
|
Definition at line 87 of file LatticeBase.h. Referenced by addLeftNodeToLink(), addRightNodeToLink(), cLshared(), connectLinks(), LatticeBase(), shareLinksLeft(), shareLinksRight(), sLLshared(), and sLRshared(). |
|
|
Definition at line 311 of file LatticeBase.h. Referenced by show(). |
|
|
Definition at line 85 of file LatticeBase.h. |
|
|
Definition at line 92 of file LatticeBase.h. Referenced by addLeftNodeToLink(), addRightNodeToLink(), and rightNode(). |
|
|
Reimplemented in Lattice. Definition at line 82 of file LatticeBase.h. Referenced by addRightNodeToLink(), checkRNtopo(), connect(), linkGivenRight(), linksGivenRight(), newRightNode(), vLeftGivenRight(), and vRightGivenRight(). |
|
|
Definition at line 310 of file LatticeBase.h. Referenced by LatticeBase(). |
|
|
Definition at line 312 of file LatticeBase.h. Referenced by show(). |
|
|
Definition at line 88 of file LatticeBase.h. Referenced by addLeftNodeToLink(), addRightNodeToLink(), connect(), LatticeBase(), shareLinksLeft(), and sLLshared(). |
|
|
Definition at line 89 of file LatticeBase.h. Referenced by addLeftNodeToLink(), addRightNodeToLink(), cLshared(), connect(), connectLinks(), LatticeBase(), shareLinksRight(), and sLRshared(). |
|
|
Definition at line 102 of file LatticeBase.h. 00102 { Default = 0, LNodeMulti = 1, RNodeMulti = 2,
00103 LLinkMulti = 3, RLinkMulti = 4 };
|
|
||||||||||||||||||||
|
Definition at line 74 of file LatticeBase.cxx. References LeftNodes, Links, m_Topology, MSG, RightNodes, VectorLeftID, and VectorRightID. 00078 : m_LeftNodes (*new LeftNodes), 00079 m_RightNodes(*new RightNodes), 00080 m_Links (*new Links), 00081 m_VLeftID (*new VectorLeftID), 00082 m_VRightID (*new VectorRightID) 00083 { 00084 MSG("Lat",Msg::kDebug) << "In ctor()." << endl; 00085 //--------------------------------------------------+ 00086 // Initialize topology. | 00087 // The default value of i,j,k,l is 0, but | 00088 // m_Topology[0] isn't used, so this ought to work. | 00089 //--------------------------------------------------+ 00090 for (int index=0; index < 5; m_Topology[index++] = false); 00091 m_Topology[i] = true; 00092 m_Topology[j] = true; 00093 m_Topology[k] = true; 00094 m_Topology[l] = true; 00095 MSG("Lat",Msg::kDebug) << "Topology is" << "Sorry, not available yet" << endl; 00096 }
|
|
|
Definition at line 103 of file LatticeBase.cxx. References LinkItr, m_LeftNodes, m_Links, m_RightNodes, and MSG. 00104 {
00105 MSG("Lat",Msg::kDebug) << "in Lattice dtor()" << endl;
00106
00107 for (LeftNodes::iterator i = m_LeftNodes.begin();
00108 i != m_LeftNodes.end(); ++i)
00109 {
00110 delete *i;
00111 }
00112 delete &m_LeftNodes;
00113 delete &m_VLeftID;
00114
00115 for (RightNodes::iterator j = m_RightNodes.begin();
00116 j != m_RightNodes.end(); ++j)
00117 {
00118 delete *j;
00119 }
00120 delete &m_RightNodes;
00121 delete &m_VRightID;
00122
00123 for (LinkItr k = m_Links.begin(); k != m_Links.end(); ++k)
00124 {
00125 delete *k;
00126 }
00127 delete &m_Links;
00128 }
|
|
|
|
|
||||||||||||
|
Definition at line 1106 of file LatticeBase.cxx. References find(), LeftItr, leftNode(), LeftNode, Link, links(), Links, LatticeLeftNode::m_Links, LatticeRightNode::m_VLeftID, LatticeLeftNode::m_VLeftID, LatticeLink::m_VLeftID, LatticeLeftNode::m_VRightID, LatticeLink::m_VRightID, RightItr, rightNode(), VectorLeftID, and VectorRightID. Referenced by connect(). 01107 {
01108 // If this node is already in the link's left vector, abort.
01109 VectorLeftID& ld = link.m_VLeftID;
01110 if (find(ld.begin(),ld.end(),id) != ld.end())
01111 {
01112 return;
01113 }
01114
01115 LeftNode* pThis = leftNode(id);
01116 Links& links = pThis->m_Links;
01117
01118 // Iterate over the link's left vector. Update the left node vectors.
01119 // We must test that two nodes aren't already connected by another link.
01120 for (LeftItr iL = ld.begin(); iL != ld.end(); ++iL)
01121 {
01122 VectorLeftID& nv = pThis->m_VLeftID;
01123 if (find(nv.begin(),nv.end(),*iL) == nv.end())
01124 {
01125 leftNode(*iL)->m_VLeftID.push_back(id);
01126 pThis ->m_VLeftID.push_back(*iL);
01127 }
01128 }
01129
01130 // Push this node onto the link's left node vector,
01131 // and the link onto the node's link vector.
01132 ld .push_back(id);
01133 links.push_back(&link);
01134
01135 // Iterate over the link's right vector. Update the far node vectors.
01136 // We must test that two nodes aren't already connected by another link.
01137 VectorRightID& rd = link.m_VRightID;
01138 for (RightItr iR = rd.begin(); iR != rd.end(); ++iR)
01139 {
01140 VectorRightID&fv = pThis->m_VRightID;
01141 if (find(fv.begin(),fv.end(),*iR) == fv.end())
01142 {
01143 rightNode(*iR)->m_VLeftID. push_back(id);
01144 pThis ->m_VRightID.push_back(*iR);
01145 }
01146 }
01147 }
|
|
||||||||||||
|
Definition at line 1152 of file LatticeBase.cxx. References find(), LeftItr, leftNode(), Link, links(), Links, LatticeRightNode::m_Links, LatticeRightNode::m_VLeftID, LatticeLink::m_VLeftID, LatticeLeftNode::m_VRightID, LatticeRightNode::m_VRightID, LatticeLink::m_VRightID, RightItr, rightNode(), RightNode, VectorLeftID, and VectorRightID. Referenced by connect(). 01153 {
01154 // If this node is already in the link's right vector, abort.
01155 VectorRightID& rd = link.m_VRightID;
01156 if (find(rd.begin(),rd.end(),id) != rd.end())
01157 {
01158 return;
01159 }
01160
01161 RightNode* pThis = rightNode(id);
01162 Links& links = pThis->m_Links;
01163
01164 // Iterate over the link's right vector. Update the right node vectors.
01165 // We must test that two nodes aren't already connected by another link.
01166 for (RightItr iR = rd.begin(); iR != rd.end(); ++iR)
01167 {
01168 VectorRightID nv = pThis->m_VRightID;
01169 if (find(nv.begin(),nv.end(),*iR) == nv.end())
01170 {
01171 rightNode(*iR)->m_VRightID.push_back(id);
01172 pThis ->m_VRightID.push_back(*iR);
01173 }
01174 }
01175
01176 // Push this node onto the link's right node vector,
01177 // and the link onto the node's link vector.
01178 rd .push_back(id);
01179 links.push_back(&link);
01180
01181 // Iterate over the link's left vector. Update the far node vectors.
01182 // We must test that two nodes aren't already connected by another link.
01183 VectorLeftID& ld = link.m_VLeftID;
01184 for (LeftItr iL = ld.begin(); iL != ld.end(); ++iL)
01185 {
01186 VectorLeftID& fv = pThis->m_VLeftID;
01187 if (find(fv.begin(),fv.end(),*iL) == fv.end())
01188 {
01189 leftNode(*iL)->m_VRightID.push_back(id);
01190 pThis ->m_VLeftID .push_back(*iL);
01191 }
01192 }
01193 }
|
|
|
Definition at line 1081 of file LatticeBase.cxx. References Link, m_Topology, and LatticeLink::m_VLeftID. Referenced by connect(). 01082 {
01083 return m_Topology[LLinkMulti] || (0 == link.m_VLeftID.size());
01084 }
|
|
|
Definition at line 1066 of file LatticeBase.cxx. References LeftNode, LatticeLeftNode::m_Links, and m_Topology. Referenced by connect(). 01067 {
01068 return m_Topology[LNodeMulti] || (0 == pLN->m_Links.size());
01069 }
|
|
|
Definition at line 1088 of file LatticeBase.cxx. References Link, m_Topology, and LatticeLink::m_VRightID. Referenced by connect(). 01089 {
01090 return m_Topology[RLinkMulti] || (0 == link.m_VRightID.size());
01091 }
|
|
|
Definition at line 1074 of file LatticeBase.cxx. References LatticeRightNode::m_Links, m_Topology, and RightNode. Referenced by connect(). 01075 {
01076 return m_Topology[RNodeMulti] || (0 == pRN->m_Links.size());
01077 }
|
|
||||||||||||
|
Definition at line 630 of file LatticeBase.cxx. References find(), Link, LinkItr, Links, linksGivenLeft(), VectorRightID, vRightGivenLeft(), and LatticeLink::vRightID(). Referenced by connectLink(). 00631 {
00632 const Link* pLink = 0;
00633 // Get the left node's right ID container. Abort if lid is not valid.
00634 const VectorRightID* v1 = vRightGivenLeft(lid);
00635 if(0 == v1)
00636 {
00637 return 0;
00638 }
00639
00640 // Look for the links that make the connection
00641 if (find(v1->begin(), v1->end(), rid) != v1->end())
00642 {
00643 // Look for rid in each link's right data container.
00644 // The first time it's found, set pLink.
00645 // If it's found a second time, abort (return 0).
00646 const Links* list = linksGivenLeft(lid);
00647 for (LinkItr i = list->begin(); i != list->end(); ++i)
00648 { const VectorRightID& v2 = (*i)->vRightID();
00649 if (find(v2.begin(), v2.end(), rid) != v2.end())
00650 {
00651 if (0 == pLink)
00652 {
00653 pLink = *i;
00654 }
00655 else
00656 {
00657 return 0;
00658 }
00659 }
00660 }
00661 }
00662 return pLink;
00663 }
|
|
||||||||||||
|
Definition at line 266 of file LatticeBase.cxx. References addRightNodeToLink(), checkRLtopo(), checkRNtopo(), find(), Link, LatticeLink::m_VRightID, MSG, rightNode(), RightNode, and VectorRightID. 00267 {
00268 VectorRightID& rd = link.m_VRightID;
00269 RightNode* pRight = rightNode(rid);
00270
00271
00272 // Make the connection if topology constraint is satisfied.
00273 if ( find(rd.begin(),rd.end(),rid) != rd.end()
00274 || (checkRNtopo(pRight) && checkRLtopo(link)) )
00275 {
00276 addRightNodeToLink(rid, link);
00277 return &link;
00278 }
00279 else
00280 {
00281 MSG("Lat",Msg::kWarning)
00282 << " connect attempts to violate topology constraint." << endl;
00283 return 0;
00284 }
00285 }
|
|
||||||||||||
|
Definition at line 244 of file LatticeBase.cxx. References addLeftNodeToLink(), checkLLtopo(), checkLNtopo(), find(), leftNode(), LeftNode, Link, LatticeLink::m_VLeftID, MSG, and VectorLeftID. 00245 {
00246 VectorLeftID& ld = link.m_VLeftID;
00247 LeftNode* pLeft = leftNode(lid);
00248
00249 // Make the connection if topology constraint is satisfied.
00250 if ( find(ld.begin(),ld.end(),lid) != ld.end()
00251 || (checkLNtopo(pLeft) && checkLLtopo(link)) )
00252 {
00253 addLeftNodeToLink(lid, link);
00254 return &link;
00255 }
00256 else
00257 {
00258 MSG("Lat",Msg::kWarning)
00259 << " connect attempts to violate topology constraint." << endl;
00260 return 0;
00261 }
00262 }
|
|
||||||||||||||||
|
Definition at line 237 of file LatticeBase.cxx. References connect(), and Link.
|
|
||||||||||||||||
|
Definition at line 209 of file LatticeBase.cxx. References addLeftNodeToLink(), addRightNodeToLink(), checkLLtopo(), checkLNtopo(), checkRLtopo(), checkRNtopo(), find(), leftNode(), LeftNode, Link, LatticeLink::m_VLeftID, LatticeLink::m_VRightID, MSG, rightNode(), RightNode, VectorLeftID, and VectorRightID. 00210 {
00211 VectorLeftID& ld = link.m_VLeftID;
00212 VectorRightID& rd = link.m_VRightID;
00213 LeftNode* pLeft = leftNode (lid);
00214 RightNode* pRight = rightNode(rid);
00215
00216 // Make the connection if topology constraint is satisfied.
00217 if ( ( find(ld.begin(),ld.end(),lid) != ld.end()
00218 || (checkLNtopo(pLeft) && checkLLtopo(link)) )
00219 && ( find(rd.begin(),rd.end(),rid) != rd.end()
00220 || (checkRNtopo(pRight)&& checkRLtopo(link)) ) )
00221 {
00222 addLeftNodeToLink (lid, link);
00223 addRightNodeToLink(rid, link);
00224 return &link;
00225 }
00226 else
00227 {
00228 MSG("Lat",Msg::kWarning)
00229 << " connect attempts to violate topology constraint." << endl;
00230 return 0;
00231 }
00232 }
|
|
||||||||||||
|
Definition at line 175 of file LatticeBase.cxx. References checkLNtopo(), checkRNtopo(), leftNode(), LeftNode, Link, LatticeRightNode::m_Links, LatticeLeftNode::m_Links, m_Links, LatticeRightNode::m_VLeftID, LatticeLeftNode::m_VRightID, MSG, newLeftNode(), newRightNode(), rightNode(), and RightNode. 00176 {
00177 // Point to the nodes having the two IDs.
00178 // If no node exists (pointer=0), make a new node.
00179 LeftNode* pLN = leftNode(leftID);
00180 LeftNode* lNode = (pLN)? pLN : newLeftNode(leftID);
00181
00182 RightNode* pRN = rightNode(rightID);
00183 RightNode* rNode = (pRN)? pRN : newRightNode(rightID);
00184
00185 // Make the link if the nodes will still satisfy the topology constraint.
00186 if (checkLNtopo(lNode) && checkRNtopo(rNode))
00187 {
00188 Link* link = new Link(lNode, rNode);
00189 m_Links.push_back(link);
00190
00191 // Update the nodes.
00192 // Can't use data access methods, because they return const.
00193 lNode->m_Links .push_back(link);
00194 rNode->m_Links .push_back(link);
00195 lNode->m_VRightID.push_back(rightID);
00196 rNode->m_VLeftID .push_back(leftID);
00197
00198 return link;
00199 }
00200
00201 MSG("Lat",Msg::kWarning)
00202 << " connect attempts to violate topology constraint." << endl;
00203 return 0;
00204 }
|
|
||||||||||||||||
|
Definition at line 140 of file LatticeBase.cxx. References checkLNtopo(), checkRNtopo(), leftNode(), LeftNode, Link, LinkData, LatticeRightNode::m_Links, LatticeLeftNode::m_Links, m_Links, LatticeRightNode::m_VLeftID, LatticeLeftNode::m_VRightID, MSG, newLeftNode(), newRightNode(), rightNode(), and RightNode. Referenced by connect(), and Lattice::ConnectLR(). 00141 {
00142 // Point to the nodes having the two IDs.
00143 // If no node exists (pointer=0), make a new node.
00144
00145 LeftNode* pLN = leftNode(leftID);
00146 LeftNode* lNode = (pLN)? pLN : newLeftNode(leftID);
00147
00148 RightNode* pRN = rightNode(rightID);
00149 RightNode* rNode = (pRN)? pRN : newRightNode(rightID);
00150
00151 // Make the link if the nodes will still satisfy the topology constraint.
00152 if (checkLNtopo(lNode) && checkRNtopo(rNode))
00153 {
00154 Link* link = new Link(lNode, rNode, LinkData);
00155 m_Links.push_back(link);
00156
00157 // Update the nodes.
00158 // Can't use data access methods, because they return const.
00159 lNode->m_Links .push_back(link);
00160 rNode->m_Links .push_back(link);
00161 lNode->m_VRightID.push_back(rightID);
00162 rNode->m_VLeftID .push_back(leftID);
00163
00164 return link;
00165 }
00166
00167 MSG("Lat",Msg::kWarning)
00168 << " connect attempts to violate topology constraint." << endl;
00169 return 0;
00170 }
|
|
||||||||||||
|
Definition at line 688 of file LatticeBase.cxx. References connectLink(). 00689 {
00690 return connectLink(*li, *ri);
00691 }
|
|
||||||||||||
|
Definition at line 681 of file LatticeBase.cxx. References connectLink(). 00682 {
00683 return connectLink(*li, *ri);
00684 }
|
|
||||||||||||
|
Definition at line 674 of file LatticeBase.cxx. References cLshared(). 00675 {
00676 return const_cast<Link*>(cLshared(lid,rid));
00677 }
|
|
||||||||||||
|
Definition at line 667 of file LatticeBase.cxx. References cLshared(). Referenced by connectLink(). 00668 {
00669 return cLshared(lid,rid);
00670 }
|
|
||||||||||||||||
|
Definition at line 546 of file LatticeBase.cxx. References connectLinks(), and Links. 00547 {
00548 connectLinks(*li, *ri, links);
00549 }
|
|
||||||||||||||||
|
Definition at line 521 of file LatticeBase.cxx. References find(), LinkItr, Links, linksGivenLeft(), VectorRightID, and vRightGivenLeft(). Referenced by connectLinks(). 00522 {
00523 // Get the left node's right data container (rd=0 if leftID is not valid).
00524 const VectorRightID* rd = vRightGivenLeft(leftID);
00525 if(0 != rd)
00526 {
00527 // If rightID is in it, look for the links that make the connection
00528 if (find(rd->begin(), rd->end(), rightID) != rd->end())
00529 {
00530 // Look for rightID in each link's right data container.
00531 // If it's there, put the link in the user provided link container.
00532 const Links* list = linksGivenLeft(leftID);
00533 for (LinkItr i = list->begin(); i != list->end(); ++i)
00534 { const VectorRightID& rd2 = (*i)->vRightID();
00535 if (find(rd2.begin(), rd2.end(), rightID) != rd2.end())
00536 {
00537 links.push_back(*i);
00538 }
00539 }
00540 }
00541 }
00542 }
|
|
|
Definition at line 833 of file LatticeBase.cxx. References m_Links. 00834 {
00835 return 0 == m_Links.size();
00836 }
|
|
|
Definition at line 861 of file LatticeBase.cxx. References m_Topology. Referenced by topologyText(). 00862 {
00863 return m_Topology[LLinkMulti];
00864 }
|
|
|
Definition at line 847 of file LatticeBase.cxx. References m_Topology. Referenced by topologyText(). 00848 {
00849 return m_Topology[LNodeMulti];
00850 }
|
|
|
Definition at line 868 of file LatticeBase.cxx. References m_Topology. Referenced by topologyText(). 00869 {
00870 return m_Topology[RLinkMulti];
00871 }
|
|
|
Definition at line 854 of file LatticeBase.cxx. References m_Topology. Referenced by topologyText(). 00855 {
00856 return m_Topology[RNodeMulti];
00857 }
|
|
|
Definition at line 197 of file LatticeBase.h. 00198 {
00199 return leftIDGivenLeft(*leftItr);
00200 }
|
|
|
Definition at line 190 of file LatticeBase.h. References LatticeLeftNode::m_VLeftID. 00191 {
00192 const LeftNode* pLN = leftNode(leftID);
00193 return ( (0==pLN) || (1 != pLN->m_VLeftID.size()) ) ?
00194 0 : &(pLN->m_VLeftID.front());
00195 }
|
|
|
Definition at line 221 of file LatticeBase.h. 00222 {
00223 return leftIDGivenRight(*rightItr);
00224 }
|
|
|
Definition at line 214 of file LatticeBase.h. References LatticeRightNode::m_VLeftID. 00215 {
00216 const RightNode* pRN = rightNode(rightID);
00217 return ( (0==pRN) || (1 != pRN->m_VLeftID.size()) ) ?
00218 0 : &(pRN->m_VLeftID.front());
00219 }
|
|
|
Definition at line 1031 of file LatticeBase.cxx. References find(), LeftItr, m_LeftNodes, and m_VLeftID. Referenced by addLeftNodeToLink(), addRightNodeToLink(), connect(), Lattice::ConnectLR(), linkGivenLeft(), linksGivenLeft(), showLeft(), vLeftGivenLeft(), and vRightGivenLeft(). 01032 {
01033 LeftItr found = find(m_VLeftID.begin(),m_VLeftID.end(),leftID);
01034 if (found != m_VLeftID.end())
01035 {
01036 unsigned int index = found - m_VLeftID.begin();
01037 return m_LeftNodes[index];
01038 }
01039 else
01040 {
01041 return 0;
01042 }
01043 }
|
|
|
Definition at line 385 of file LatticeBase.cxx. References leftNode(), LeftNode, and LatticeLeftNode::links(). 00386 {
00387 const LeftNode* pLN = leftNode(leftID);
00388 return ( (0==pLN) || (1 != pLN->links().size()) )?
00389 0 : pLN->links().front();
00390 }
|
|
|
Definition at line 376 of file LatticeBase.cxx. References leftNode(), LeftNode, and LatticeLeftNode::links(). 00377 {
00378 const LeftNode* pLN = leftNode(leftID);
00379 return ( (0==pLN) || (1 != pLN->links().size()) )?
00380 0 : pLN->links().front();
00381 }
|
|
|
Definition at line 401 of file LatticeBase.cxx. References linkGivenLeft(). 00402 {
00403 return linkGivenLeft(*leftItr);
00404 }
|
|
|
Definition at line 394 of file LatticeBase.cxx. Referenced by linkGivenLeft(). 00395 {
00396 return linkGivenLeft(*leftItr);
00397 }
|
|
|
Definition at line 417 of file LatticeBase.cxx. References LatticeRightNode::links(), rightNode(), and RightNode. 00418 {
00419 const RightNode* pRN = rightNode(rightID);
00420 return ( (0==pRN) || (1 != pRN->links().size()) ) ? 0 : pRN->links().front();
00421 }
|
|
|
Definition at line 409 of file LatticeBase.cxx. References LatticeRightNode::links(), rightNode(), and RightNode. 00410 {
00411 const RightNode* pRN = rightNode(rightID);
00412 return ( (0==pRN) || (1 != pRN->links().size()) ) ? 0 : pRN->links().front();
00413 }
|
|
|
Definition at line 432 of file LatticeBase.cxx. References linkGivenRight(). 00433 {
00434 return linkGivenRight(*rightItr);
00435 }
|
|
|
Definition at line 425 of file LatticeBase.cxx. Referenced by linkGivenRight(). 00426 {
00427 return linkGivenRight(*rightItr);
00428 }
|
|
|
Definition at line 318 of file LatticeBase.cxx. Referenced by addLeftNodeToLink(), addRightNodeToLink(), and show(). 00319 {
00320 return m_Links;
00321 }
|
|
|
Definition at line 337 of file LatticeBase.cxx. References leftNode(), LeftNode, and LatticeLeftNode::links(). 00338 {
00339 const LeftNode* pLN = leftNode(leftID);
00340 return (0==pLN) ? 0 : &(pLN->links());
00341 }
|
|
|
Definition at line 345 of file LatticeBase.cxx. Referenced by cLshared(), connectLinks(), shareLinksLeft(), and sLLshared(). 00346 {
00347 return linksGivenLeft(*leftItr);
00348 }
|
|
|
Definition at line 353 of file LatticeBase.cxx. References LatticeRightNode::links(), rightNode(), and RightNode. 00354 {
00355 const RightNode* pRN = rightNode(rID);
00356 return (0==pRN) ? 0 : &(pRN->links());
00357 }
|
|
|
Definition at line 361 of file LatticeBase.cxx. Referenced by shareLinksRight(), and sLRshared(). 00362 {
00363 return linksGivenRight(*rightItr);
00364 }
|
|
|
Definition at line 992 of file LatticeBase.cxx. References find(), LeftNode, m_LeftNodes, m_VLeftID, and MSG. Referenced by connect(), and Lattice::ConnectLR(). 00993 {
00994 LeftNode* pLN(0);
00995 if (find(m_VLeftID.begin(),m_VLeftID.end(),id) == m_VLeftID.end())
00996 {
00997 m_LeftNodes.push_back(pLN = new LeftNode(id));
00998 m_VLeftID .push_back(id);
00999 }
01000 else
01001 {
01002 MSG("Lat",Msg::kWarning) << "Duplicate left identifier: " << id << endl;
01003 }
01004 return pLN;
01005 }
|
|
|
Definition at line 1009 of file LatticeBase.cxx. References find(), m_RightNodes, m_VRightID, MSG, and RightNode. Referenced by connect(), and Lattice::ConnectLR(). 01010 {
01011 RightNode* pRN(0);
01012 if (find(m_VRightID.begin(),m_VRightID.end(),id) == m_VRightID.end())
01013 {
01014 m_RightNodes.push_back(pRN = new RightNode(id));
01015 m_VRightID .push_back(id);
01016 }
01017 else
01018 {
01019 MSG("Lat",Msg::kWarning) << "Duplicate right identifier: " << id << endl;
01020 }
01021 return pRN;
01022 }
|
|
|
|
|
|
Definition at line 290 of file LatticeBase.cxx. References Link. 00291 {
00292 delete &link;
00293 }
|
|
|
Definition at line 209 of file LatticeBase.h. 00210 {
00211 return rightIDGivenLeft(*leftItr);
00212 }
|
|
|
Definition at line 202 of file LatticeBase.h. References LatticeLeftNode::m_VRightID. 00203 {
00204 const LeftNode* pLN = leftNode(leftID);
00205 return ( (0==pLN) || (1 != pLN->m_VRightID.size()) ) ?
00206 0 : &(pLN->m_VRightID.front());
00207 }
|
|
|
Definition at line 233 of file LatticeBase.h. 00234 {
00235 return rightIDGivenRight(*rightItr);
00236 }
|
|
|
Definition at line 226 of file LatticeBase.h. References LatticeRightNode::m_VRightID. 00227 {
00228 const RightNode* pRN = rightNode(rightID);
00229 return ( (0==pRN) || (1 != pRN->m_VRightID.size()) ) ?
00230 0 : &(pRN->m_VRightID.front());
00231 }
|
|
|
Definition at line 1047 of file LatticeBase.cxx. References find(), m_RightNodes, m_VRightID, and RightItr. Referenced by addLeftNodeToLink(), addRightNodeToLink(), connect(), Lattice::ConnectLR(), linkGivenRight(), linksGivenRight(), showRight(), vLeftGivenRight(), and vRightGivenRight(). 01048 {
01049 RightItr found = find(m_VRightID.begin(),m_VRightID.end(),rightID);
01050 if (found != m_VRightID.end())
01051 {
01052 unsigned int index = found - m_VRightID.begin();
01053 return m_RightNodes[index];
01054 }
01055 else
01056 {
01057 return 0;
01058 }
01059 }
|
|
||||||||||||
|
Definition at line 755 of file LatticeBase.cxx. References shareLinkLeft(). 00756 {
00757 return shareLinkLeft(*i1, *i2);
00758 }
|
|
||||||||||||
|
Definition at line 748 of file LatticeBase.cxx. References shareLinkLeft(). 00749 {
00750 return shareLinkLeft(*i1, *i2);
00751 }
|
|
||||||||||||
|
Definition at line 741 of file LatticeBase.cxx. References sLLshared(). 00742 {
00743 return const_cast<Link*>(sLLshared(id1,id2));
00744 }
|
|
||||||||||||
|
Definition at line 734 of file LatticeBase.cxx. References sLLshared(). Referenced by shareLinkLeft(). 00735 {
00736 return sLLshared(id1,id2);
00737 }
|
|
||||||||||||
|
Definition at line 823 of file LatticeBase.cxx. References shareLinkRight(). 00824 {
00825 return shareLinkRight(*i1, *i2);
00826 }
|
|
||||||||||||
|
Definition at line 816 of file LatticeBase.cxx. References shareLinkRight(). 00817 {
00818 return shareLinkRight(*i1, *i2);
00819 }
|
|
||||||||||||
|
Definition at line 809 of file LatticeBase.cxx. References sLRshared(). 00810 {
00811 return const_cast<Link*>(sLRshared(id1,id2));
00812 }
|
|
||||||||||||
|
Definition at line 801 of file LatticeBase.cxx. References sLRshared(). Referenced by shareLinkRight(). 00802 {
00803
00804 return sLRshared(id1,id2);
00805 }
|
|
||||||||||||||||
|
Definition at line 579 of file LatticeBase.cxx. References Links, and shareLinksLeft(). 00580 {
00581 shareLinksLeft(*li1, *li2, links);
00582 }
|
|
||||||||||||||||
|
Definition at line 554 of file LatticeBase.cxx. References find(), LinkItr, Links, linksGivenLeft(), VectorLeftID, and vLeftGivenLeft(). Referenced by shareLinksLeft(). 00555 {
00556 // Get the first node's left data container (ld1=0 if leftID1 is not valid).
00557 const VectorLeftID* ld1 = vLeftGivenLeft(leftID1);
00558 if(0 != ld1)
00559 {
00560 // If leftID2 is in it, look for the links that make the connection
00561 if (find(ld1->begin(), ld1->end(), leftID2) != ld1->end())
00562 {
00563 // Look for leftID2 in each link's left data container.
00564 // If it's there, put the link in the user provided link container.
00565 const Links* list = linksGivenLeft(leftID2);
00566 for (LinkItr i = list->begin(); i != list->end(); ++i)
00567 { const VectorLeftID& ld2 = (*i)->vLeftID();
00568 if (find(ld2.begin(), ld2.end(), leftID2) != ld2.end())
00569 {
00570 links.push_back(*i);
00571 }
00572 }
00573 }
00574 }
00575 }
|
|
||||||||||||||||
|
Definition at line 612 of file LatticeBase.cxx. References Links, and shareLinksRight(). 00613 {
00614 shareLinksRight(*ri1, *ri2, links);
00615 }
|
|
||||||||||||||||
|
Definition at line 587 of file LatticeBase.cxx. References find(), LinkItr, Links, linksGivenRight(), VectorRightID, and vRightGivenRight(). Referenced by shareLinksRight(). 00588 {
00589 // Get the first node's right data container (rd1=0 if rightID1 not valid).
00590 // If rightID2 is in it, look for the links that make the connection
00591 const VectorRightID* rd1 = vRightGivenRight(rightID1);
00592 if(0 != rd1)
00593 {
00594 if (find(rd1->begin(), rd1->end(), rightID2) != rd1->end())
00595 {
00596 // Look for rightID2 in each link's right data container.
00597 // If it's there, put the link in the user provided link container.
00598 const Links* list = linksGivenRight(rightID2);
00599 for (LinkItr i = list->begin(); i != list->end(); ++i)
00600 { const VectorRightID& rd2 = (*i)->vRightID();
00601 if (find(rd2.begin(), rd2.end(), rightID2) != rd2.end())
00602 {
00603 links.push_back(*i);
00604 }
00605 }
00606 }
00607 }
00608 }
|
|
|
Definition at line 898 of file LatticeBase.cxx. References LinkItr, links(), LNodeItr, m_LeftNodes, m_Links, m_RightNodes, RNodeItr, and LatticeLink::show(). 00899 {
00900 typedef LatticeBase Lattice;
00901 os << "Lattice has topology " << "Sorry, not available yet" << endl
00902 << " It contains: " << m_LeftNodes.size() << " left data," << endl
00903 << " " << m_RightNodes.size() << " right data," << endl
00904 << " and " << m_Links.size() << " links." << endl;
00905
00906 // Display the left nodes.
00907 Lattice::LNodeItr iL = m_LeftNodes.begin();
00908 Lattice::LNodeItr iLend = m_LeftNodes.end();
00909 for ( ; iL != iLend; ++iL)
00910 {
00911 (*iL)->show(os);
00912 }
00913
00914 // Display the right nodes.
00915 Lattice::RNodeItr iR = m_RightNodes.begin();
00916 Lattice::RNodeItr iRend = m_RightNodes.end();
00917 for ( ; iR != iRend; ++iR)
00918 {
00919 (*iR)->show(os);
00920 }
00921
00922 // Display the links.
00923 Lattice::LinkItr iLink = links().begin();
00924 Lattice::LinkItr iLinkEnd = links().end();
00925 for ( ; iLink != iLinkEnd; ++iLink)
00926 {
00927 if (0 != *iLink)
00928 {
00929 (*iLink)->show(os);
00930 }
00931 }
00932 }
|
|
||||||||||||
|
Definition at line 945 of file LatticeBase.cxx. References leftNode(), and LatticeLeftNode::show().
|
|
||||||||||||
|
Definition at line 937 of file LatticeBase.cxx. References leftNode(), and LatticeLeftNode::show().
|
|
||||||||||||
|
Definition at line 977 of file LatticeBase.cxx. References LatticeLink::show(). 00978 {
00979 (*i)->show(os);
00980 }
|
|
||||||||||||
|
Definition at line 969 of file LatticeBase.cxx. References Link, and LatticeLink::show(). 00970 {
00971 pLink->show(os);
00972 }
|
|
||||||||||||
|
Definition at line 961 of file LatticeBase.cxx. References rightNode(), and LatticeRightNode::show().
|
|
||||||||||||
|
Definition at line 953 of file LatticeBase.cxx. References rightNode(), and LatticeRightNode::show().
|
|
||||||||||||
|
Definition at line 697 of file LatticeBase.cxx. References find(), Link, LinkItr, Links, linksGivenLeft(), VectorLeftID, vLeftGivenLeft(), and LatticeLink::vLeftID(). Referenced by shareLinkLeft(). 00698 {
00699 const Link* pLink = 0;
00700 // Get the first node's left ID container. Abort if the ID is not valid.
00701 const VectorLeftID* v1 = vLeftGivenLeft(id1);
00702 if(0 == v1)
00703 {
00704 return 0;
00705 }
00706
00707 // Look for the links that make the connection
00708 if (find(v1->begin(), v1->end(), id2) != v1->end())
00709 {
00710 // Look for id2 in each link's left data container.
00711 // The first time it's found, set pLink.
00712 // If it's found a second time, abort (return 0).
00713 const Links* list = linksGivenLeft(id1);
00714 for (LinkItr i = list->begin(); i != list->end(); ++i)
00715 { const VectorLeftID& v2 = (*i)->vLeftID();
00716 if (find(v2.begin(), v2.end(), id2) != v2.end())
00717 {
00718 if (0 == pLink)
00719 {
00720 pLink = *i;
00721 }
00722 else
00723 {
00724 return 0;
00725 }
00726 }
00727 }
00728 }
00729 return pLink;
00730 }
|
|
||||||||||||
|
Definition at line 764 of file LatticeBase.cxx. References find(), Link, LinkItr, Links, linksGivenRight(), VectorRightID, vRightGivenRight(), and LatticeLink::vRightID(). Referenced by shareLinkRight(). 00765 {
00766 Link* pLink = 0;
00767 // Get the first node's left ID container. Abort if the ID is not valid.
00768 const VectorRightID* v1 = vRightGivenRight(id1);
00769 if(0 == v1)
00770 {
00771 return 0;
00772 }
00773
00774 // Look for the links that make the connection
00775 if (find(v1->begin(), v1->end(), id2) != v1->end())
00776 {
00777 // Look for id2 in each link's right data container.
00778 // The first time it's found, set pLink.
00779 // If it's found a second time, abort (return 0).
00780 const Links* list = linksGivenRight(id1);
00781 for (LinkItr i = list->begin(); i != list->end(); ++i)
00782 { const VectorRightID& v2 = (*i)->vRightID();
00783 if (find(v2.begin(), v2.end(), id2) != v2.end())
00784 {
00785 if (0 == pLink)
00786 {
00787 pLink = *i;
00788 }
00789 else
00790 {
00791 return 0;
00792 }
00793 }
00794 }
00795 }
00796 return pLink;
00797 }
|
|
|
Definition at line 875 of file LatticeBase.cxx. References isLLinkMulti(), isLNodeMulti(), isRLinkMulti(), isRNodeMulti(), m_Topology, and s(). 00876 {
00877 if ( !( isLNodeMulti() || isRNodeMulti()
00878 || isLLinkMulti() || isRLinkMulti()) )
00879 {
00880 return " default (single connections only)";
00881 }
00882 else
00883 {
00884 string s = "";
00885 if (m_Topology[LNodeMulti]) { s += " LNodeMulti";}
00886 if (m_Topology[RNodeMulti]) { s += " RNodeMulti";}
00887 if (m_Topology[LLinkMulti]) { s += " LLinkMulti";}
00888 if (m_Topology[RLinkMulti]) { s += " RLinkMulti";}
00889 return s;
00890 }
00891 }
|
|
|
Definition at line 458 of file LatticeBase.cxx. References vLeftGivenLeft(). 00459 {
00460 return vLeftGivenLeft(*i);;
00461 }
|
|
|
Definition at line 450 of file LatticeBase.cxx. References leftNode(), LeftNode, and LatticeLeftNode::m_VLeftID. Referenced by Lattice::GetNearIDs(), shareLinksLeft(), sLLshared(), and vLeftGivenLeft(). 00451 {
00452 const LeftNode* pLN = leftNode(leftID);
00453 return (0==pLN) ? 0 : &(pLN->m_VLeftID);
00454 }
|
|
|
Definition at line 506 of file LatticeBase.cxx. References vLeftGivenRight(). 00507 {
00508 return vLeftGivenRight(*i);
00509 }
|
|
|
Definition at line 498 of file LatticeBase.cxx. References LatticeRightNode::m_VLeftID, rightNode(), and RightNode. Referenced by Lattice::GetFarIDs(), and vLeftGivenRight(). 00499 {
00500 const RightNode* pRN = rightNode(rightID);
00501 return (0==pRN) ? 0 : &(pRN->m_VLeftID);
00502 }
|
|
|
Definition at line 304 of file LatticeBase.cxx. Referenced by Lattice::GetAllIDs(). 00305 {
00306 return m_VLeftID;
00307 }
|
|
|
Definition at line 490 of file LatticeBase.cxx. References vRightGivenLeft(). 00491 {
00492 return vRightGivenLeft(*i);
00493 }
|
|
|
Definition at line 482 of file LatticeBase.cxx. References leftNode(), LeftNode, and LatticeLeftNode::m_VRightID. Referenced by cLshared(), connectLinks(), Lattice::GetFarIDs(), and vRightGivenLeft(). 00483 {
00484 const LeftNode* pLN = leftNode(leftID);
00485 return (0==pLN) ? 0 : &(pLN->m_VRightID);
00486 }
|
|
|
Definition at line 474 of file LatticeBase.cxx. References vRightGivenRight(). 00475 {
00476 return vRightGivenRight(*i);
00477 }
|
|
|
Definition at line 466 of file LatticeBase.cxx. References LatticeRightNode::m_VRightID, rightNode(), and RightNode. Referenced by Lattice::GetNearIDs(), shareLinksRight(), sLRshared(), and vRightGivenRight(). 00467 {
00468 const RightNode* pRN = rightNode(rightID);
00469 return (0==pRN) ? 0 : &(pRN->m_VRightID);
00470 }
|
|
|
Definition at line 311 of file LatticeBase.cxx. Referenced by Lattice::GetAllIDs(). 00312 {
00313 return m_VRightID;
00314 }
|
|
|
Definition at line 356 of file LatticeBase.h. Referenced by leftNode(), newLeftNode(), show(), and ~LatticeBase(). |
|
|
Definition at line 358 of file LatticeBase.h. Referenced by connect(), isEmpty(), show(), and ~LatticeBase(). |
|
|
Definition at line 357 of file LatticeBase.h. Referenced by newRightNode(), rightNode(), show(), and ~LatticeBase(). |
|
|
Definition at line 361 of file LatticeBase.h. Referenced by checkLLtopo(), checkLNtopo(), checkRLtopo(), checkRNtopo(), isLLinkMulti(), isLNodeMulti(), isRLinkMulti(), isRNodeMulti(), LatticeBase(), and topologyText(). |
|
|
Definition at line 359 of file LatticeBase.h. Referenced by leftNode(), and newLeftNode(). |
|
|
Definition at line 360 of file LatticeBase.h. Referenced by newRightNode(), and rightNode(). |
1.3.9.1