LatticeBase Class Reference

#include <LatticeBase.h>

Inheritance diagram for LatticeBase:
Lattice

List of all members.

Public Types

enum  LatticeTopology {
  Default = 0, LNodeMulti = 1, RNodeMulti = 2, LLinkMulti = 3,
  RLinkMulti = 4
}
typedef LatticeDef::LinkData LinkData
typedef LatticeLink Link
typedef LatticeLeftNode LeftNode
typedef LatticeRightNode RightNode
typedef LatticeDef::Identifier LeftID
typedef LatticeDef::Identifier RightID
typedef vector< Link * > Links
typedef vector< LeftIDVectorLeftID
typedef vector< RightIDVectorRightID
typedef
VectorLeftID::const_iterator 
LeftItr
typedef
VectorRightID::const_iterator 
RightItr
typedef Links::const_iterator LinkItr

Public Member Functions

 LatticeBase (LatticeTopology i=Default, LatticeTopology j=Default, LatticeTopology k=Default, LatticeTopology l=Default)
virtual ~LatticeBase ()
virtual Linkconnect (LeftID, RightID, const LinkData &)
virtual Linkconnect (LeftID, RightID)
virtual Linkconnect (LeftID, Link &, RightID)
virtual Linkconnect (LeftID, Link *, RightID)
virtual Linkconnect (LeftID, Link &)
virtual Linkconnect (Link &, RightID)
virtual void removeLink (Link &)
Bool_t isEmpty () const
Bool_t isLNodeMulti () const
Bool_t isRNodeMulti () const
Bool_t isLLinkMulti () const
Bool_t isRLinkMulti () const
string topologyText () const
void show (ostream &) const
void showLeft (LeftItr, ostream &) const
void showLeft (LeftID, ostream &) const
void showRight (RightItr, ostream &) const
void showRight (RightID, ostream &) const
void showLink (Link *, ostream &) const
void showLink (LinkItr, ostream &) const
const VectorLeftIDvLeftID () const
const VectorRightIDvRightID () const
const Linkslinks () const
virtual const VectorLeftIDvLeftGivenLeft (LeftID) const
virtual const VectorLeftIDvLeftGivenLeft (LeftItr) const
virtual const VectorRightIDvRightGivenRight (RightID) const
virtual const VectorRightIDvRightGivenRight (RightItr) const
virtual const VectorRightIDvRightGivenLeft (LeftID) const
virtual const VectorRightIDvRightGivenLeft (LeftItr) const
virtual const VectorLeftIDvLeftGivenRight (RightID) const
virtual const VectorLeftIDvLeftGivenRight (RightItr) const
virtual const LeftIDleftIDGivenLeft (LeftID leftID) const
virtual const LeftIDleftIDGivenLeft (LeftItr leftItr) const
virtual const RightIDrightIDGivenLeft (LeftID leftID) const
virtual const RightIDrightIDGivenLeft (LeftItr leftItr) const
virtual const LeftIDleftIDGivenRight (RightID rightID) const
virtual const LeftIDleftIDGivenRight (RightItr rightItr) const
virtual const RightIDrightIDGivenRight (RightID rightID) const
virtual const RightIDrightIDGivenRight (RightItr rightItr) const
virtual const LinkslinksGivenLeft (LeftItr) const
virtual const LinkslinksGivenLeft (LeftID) const
virtual const LinkslinksGivenRight (RightItr) const
virtual const LinkslinksGivenRight (RightID) const
virtual const LinklinkGivenLeft (LeftItr) const
virtual LinklinkGivenLeft (LeftItr)
virtual const LinklinkGivenLeft (LeftID) const
virtual LinklinkGivenLeft (LeftID)
virtual const LinklinkGivenRight (RightItr) const
virtual LinklinkGivenRight (RightItr)
virtual const LinklinkGivenRight (RightID) const
virtual LinklinkGivenRight (RightID)
virtual void connectLinks (LeftID, RightID, Links &) const
virtual void connectLinks (LeftItr, RightItr, Links &) const
virtual void shareLinksLeft (LeftID, LeftID, Links &) const
virtual void shareLinksLeft (LeftItr, LeftItr, Links &) const
virtual void shareLinksRight (RightID, RightID, Links &) const
virtual void shareLinksRight (RightItr, RightItr, Links &) const
virtual const LinkconnectLink (LeftID, RightID) const
virtual LinkconnectLink (LeftID, RightID)
virtual const LinkconnectLink (LeftItr, RightItr) const
virtual LinkconnectLink (LeftItr, RightItr)
virtual const LinkshareLinkLeft (LeftID, LeftID) const
virtual LinkshareLinkLeft (LeftID, LeftID)
virtual const LinkshareLinkLeft (LeftItr, LeftItr) const
virtual LinkshareLinkLeft (LeftItr, LeftItr)
virtual const LinkshareLinkRight (RightID, RightID) const
virtual LinkshareLinkRight (RightID, RightID)
virtual const LinkshareLinkRight (RightItr, RightItr) const
virtual LinkshareLinkRight (RightItr, RightItr)

Protected Types

typedef vector< LeftNode * > LeftNodes
typedef vector< RightNode * > RightNodes
typedef LeftNodes::const_iterator LNodeItr
typedef RightNodes::const_iterator RNodeItr

Protected Member Functions

LeftNodenewLeftNode (LeftID)
RightNodenewRightNode (RightID)
LeftNodeleftNode (LeftID) const
RightNoderightNode (RightID) const
Bool_t checkLNtopo (LeftNode *)
Bool_t checkRNtopo (RightNode *)
Bool_t checkLLtopo (Link &)
Bool_t checkRLtopo (Link &)
void addLeftNodeToLink (LeftID, Link &)
void addRightNodeToLink (RightID, Link &)
const LinkcLshared (LeftID, RightID) const
const LinksLLshared (LeftID, LeftID) const
const LinksLRshared (RightID, RightID) const

Protected Attributes

LeftNodesm_LeftNodes
RightNodesm_RightNodes
Linksm_Links
VectorLeftIDm_VLeftID
VectorRightIDm_VRightID
bool m_Topology [5]

Private Member Functions

 LatticeBase (const LatticeBase &)
const LatticeBaseoperator= (const LatticeBase &)

Detailed Description

Definition at line 65 of file LatticeBase.h.


Member Typedef Documentation

Definition at line 84 of file LatticeBase.h.

typedef VectorLeftID ::const_iterator LatticeBase::LeftItr

Definition at line 91 of file LatticeBase.h.

Reimplemented in Lattice.

Definition at line 81 of file LatticeBase.h.

typedef vector<LeftNode*> LatticeBase::LeftNodes [protected]

Definition at line 309 of file LatticeBase.h.

Reimplemented in Lattice.

Definition at line 80 of file LatticeBase.h.

Definition at line 79 of file LatticeBase.h.

typedef Links ::const_iterator LatticeBase::LinkItr

Definition at line 93 of file LatticeBase.h.

Definition at line 87 of file LatticeBase.h.

typedef LeftNodes ::const_iterator LatticeBase::LNodeItr [protected]

Definition at line 311 of file LatticeBase.h.

Definition at line 85 of file LatticeBase.h.

typedef VectorRightID::const_iterator LatticeBase::RightItr

Definition at line 92 of file LatticeBase.h.

Reimplemented in Lattice.

Definition at line 82 of file LatticeBase.h.

typedef vector<RightNode*> LatticeBase::RightNodes [protected]

Definition at line 310 of file LatticeBase.h.

typedef RightNodes::const_iterator LatticeBase::RNodeItr [protected]

Definition at line 312 of file LatticeBase.h.

Definition at line 88 of file LatticeBase.h.

Definition at line 89 of file LatticeBase.h.


Member Enumeration Documentation

Enumerator:
Default 
LNodeMulti 
RNodeMulti 
LLinkMulti 
RLinkMulti 

Definition at line 102 of file LatticeBase.h.

00102                        { Default = 0, LNodeMulti = 1, RNodeMulti = 2,
00103                                       LLinkMulti = 3, RLinkMulti = 4 };


Constructor & Destructor Documentation

LatticeBase::LatticeBase ( LatticeTopology  i = Default,
LatticeTopology  j = Default,
LatticeTopology  k = Default,
LatticeTopology  l = Default 
)

Definition at line 74 of file LatticeBase.cxx.

References Msg::kDebug, m_Topology, and MSG.

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 }

LatticeBase::~LatticeBase (  )  [virtual]

Definition at line 103 of file LatticeBase.cxx.

References Msg::kDebug, m_LeftNodes, m_Links, m_RightNodes, m_VLeftID, m_VRightID, 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 }

LatticeBase::LatticeBase ( const LatticeBase  )  [private]

Member Function Documentation

void LatticeBase::addLeftNodeToLink ( LeftID  id,
Link link 
) [protected]

Definition at line 1106 of file LatticeBase.cxx.

References find(), leftNode(), links(), LatticeLeftNode::m_Links, LatticeLeftNode::m_VLeftID, LatticeLink::m_VLeftID, LatticeRightNode::m_VLeftID, LatticeLink::m_VRightID, LatticeLeftNode::m_VRightID, and rightNode().

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 }

void LatticeBase::addRightNodeToLink ( RightID  id,
Link link 
) [protected]

Definition at line 1152 of file LatticeBase.cxx.

References find(), leftNode(), links(), LatticeRightNode::m_Links, LatticeLink::m_VLeftID, LatticeRightNode::m_VLeftID, LatticeLink::m_VRightID, LatticeRightNode::m_VRightID, LatticeLeftNode::m_VRightID, and rightNode().

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 }

Bool_t LatticeBase::checkLLtopo ( Link link  )  [protected]

Definition at line 1081 of file LatticeBase.cxx.

References LLinkMulti, m_Topology, and LatticeLink::m_VLeftID.

Referenced by connect().

01082 {
01083   return m_Topology[LLinkMulti] || (0 == link.m_VLeftID.size());
01084 }

Bool_t LatticeBase::checkLNtopo ( LeftNode pLN  )  [protected]

Definition at line 1066 of file LatticeBase.cxx.

References LNodeMulti, LatticeLeftNode::m_Links, and m_Topology.

Referenced by connect().

01067 {
01068   return m_Topology[LNodeMulti] || (0 == pLN->m_Links.size());
01069 }

Bool_t LatticeBase::checkRLtopo ( Link link  )  [protected]

Definition at line 1088 of file LatticeBase.cxx.

References m_Topology, LatticeLink::m_VRightID, and RLinkMulti.

Referenced by connect().

01089 {
01090   return m_Topology[RLinkMulti] || (0 == link.m_VRightID.size());
01091 }

Bool_t LatticeBase::checkRNtopo ( RightNode pRN  )  [protected]

Definition at line 1074 of file LatticeBase.cxx.

References LatticeRightNode::m_Links, m_Topology, and RNodeMulti.

Referenced by connect().

01075 {
01076   return m_Topology[RNodeMulti] || (0 == pRN->m_Links.size());
01077 }

const LatticeBase::Link * LatticeBase::cLshared ( LeftID  lid,
RightID  rid 
) const [protected]

Definition at line 630 of file LatticeBase.cxx.

References find(), linksGivenLeft(), and vRightGivenLeft().

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 }

LatticeBase::Link * LatticeBase::connect ( Link link,
RightID  rid 
) [virtual]

Definition at line 266 of file LatticeBase.cxx.

References addRightNodeToLink(), checkRLtopo(), checkRNtopo(), find(), Msg::kWarning, LatticeLink::m_VRightID, MSG, and rightNode().

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 }

LatticeBase::Link * LatticeBase::connect ( LeftID  lid,
Link link 
) [virtual]

Definition at line 244 of file LatticeBase.cxx.

References addLeftNodeToLink(), checkLLtopo(), checkLNtopo(), find(), Msg::kWarning, leftNode(), LatticeLink::m_VLeftID, and MSG.

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 }

LatticeBase::Link * LatticeBase::connect ( LeftID  lid,
Link pLink,
RightID  rid 
) [virtual]

Definition at line 237 of file LatticeBase.cxx.

References connect().

00238 {
00239   return (0 == pLink) ? connect(lid, rid) : connect(lid, *pLink, rid);
00240 }

LatticeBase::Link * LatticeBase::connect ( LeftID  lid,
Link link,
RightID  rid 
) [virtual]

Definition at line 209 of file LatticeBase.cxx.

References addLeftNodeToLink(), addRightNodeToLink(), checkLLtopo(), checkLNtopo(), checkRLtopo(), checkRNtopo(), find(), Msg::kWarning, leftNode(), LatticeLink::m_VLeftID, LatticeLink::m_VRightID, MSG, and rightNode().

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 }

LatticeBase::Link * LatticeBase::connect ( LeftID  leftID,
RightID  rightID 
) [virtual]

Definition at line 175 of file LatticeBase.cxx.

References checkLNtopo(), checkRNtopo(), Msg::kWarning, leftNode(), LatticeRightNode::m_Links, m_Links, LatticeLeftNode::m_Links, LatticeRightNode::m_VLeftID, LatticeLeftNode::m_VRightID, MSG, newLeftNode(), newRightNode(), 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 }

LatticeBase::Link * LatticeBase::connect ( LeftID  leftID,
RightID  rightID,
const LinkData LinkData 
) [virtual]

Definition at line 140 of file LatticeBase.cxx.

References checkLNtopo(), checkRNtopo(), Msg::kWarning, leftNode(), LatticeRightNode::m_Links, m_Links, LatticeLeftNode::m_Links, LatticeRightNode::m_VLeftID, LatticeLeftNode::m_VRightID, MSG, newLeftNode(), newRightNode(), 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 }

LatticeBase::Link * LatticeBase::connectLink ( LeftItr  li,
RightItr  ri 
) [virtual]

Definition at line 688 of file LatticeBase.cxx.

References connectLink().

00689 {
00690   return connectLink(*li, *ri);
00691 }

const LatticeBase::Link * LatticeBase::connectLink ( LeftItr  li,
RightItr  ri 
) const [virtual]

Definition at line 681 of file LatticeBase.cxx.

References connectLink().

00682 {
00683   return connectLink(*li, *ri);
00684 }

LatticeBase::Link * LatticeBase::connectLink ( LeftID  lid,
RightID  rid 
) [virtual]

Definition at line 674 of file LatticeBase.cxx.

References cLshared().

00675 {
00676   return const_cast<Link*>(cLshared(lid,rid));
00677 }

const LatticeBase::Link * LatticeBase::connectLink ( LeftID  lid,
RightID  rid 
) const [virtual]

Definition at line 667 of file LatticeBase.cxx.

References cLshared().

Referenced by connectLink().

00668 {
00669   return cLshared(lid,rid);
00670 }

void LatticeBase::connectLinks ( LeftItr  li,
RightItr  ri,
Links links 
) const [virtual]

Definition at line 546 of file LatticeBase.cxx.

References connectLinks().

00547 {
00548   connectLinks(*li, *ri, links);
00549 }

void LatticeBase::connectLinks ( LeftID  leftID,
RightID  rightID,
Links links 
) const [virtual]

Definition at line 521 of file LatticeBase.cxx.

References find(), linksGivenLeft(), 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 }

Bool_t LatticeBase::isEmpty (  )  const

Definition at line 833 of file LatticeBase.cxx.

References m_Links.

00834 {
00835   return 0 == m_Links.size();
00836 } 

Bool_t LatticeBase::isLLinkMulti (  )  const

Definition at line 861 of file LatticeBase.cxx.

References LLinkMulti, and m_Topology.

Referenced by topologyText().

00862 {
00863   return m_Topology[LLinkMulti];
00864 }

Bool_t LatticeBase::isLNodeMulti (  )  const

Definition at line 847 of file LatticeBase.cxx.

References LNodeMulti, and m_Topology.

Referenced by topologyText().

00848 {
00849   return m_Topology[LNodeMulti];
00850 } 

Bool_t LatticeBase::isRLinkMulti (  )  const

Definition at line 868 of file LatticeBase.cxx.

References m_Topology, and RLinkMulti.

Referenced by topologyText().

00869 {
00870   return m_Topology[RLinkMulti];
00871 }

Bool_t LatticeBase::isRNodeMulti (  )  const

Definition at line 854 of file LatticeBase.cxx.

References m_Topology, and RNodeMulti.

Referenced by topologyText().

00855 {
00856   return m_Topology[RNodeMulti];
00857 }

virtual const LeftID* LatticeBase::leftIDGivenLeft ( LeftItr  leftItr  )  const [inline, virtual]

Definition at line 197 of file LatticeBase.h.

References leftIDGivenLeft().

00198   {
00199     return leftIDGivenLeft(*leftItr);
00200   }

virtual const LeftID* LatticeBase::leftIDGivenLeft ( LeftID  leftID  )  const [inline, virtual]

Definition at line 190 of file LatticeBase.h.

References leftNode(), and LatticeLeftNode::m_VLeftID.

Referenced by leftIDGivenLeft().

00191   {
00192     const LeftNode* pLN = leftNode(leftID);
00193     return ( (0==pLN) || (1 != pLN->m_VLeftID.size()) ) ?
00194       0 : &(pLN->m_VLeftID.front());
00195   }

virtual const LeftID* LatticeBase::leftIDGivenRight ( RightItr  rightItr  )  const [inline, virtual]

Definition at line 221 of file LatticeBase.h.

References leftIDGivenRight().

00222   {
00223     return leftIDGivenRight(*rightItr);
00224   }

virtual const LeftID* LatticeBase::leftIDGivenRight ( RightID  rightID  )  const [inline, virtual]

Definition at line 214 of file LatticeBase.h.

References LatticeRightNode::m_VLeftID, and rightNode().

Referenced by leftIDGivenRight().

00215   {
00216     const RightNode* pRN = rightNode(rightID);
00217     return ( (0==pRN) || (1 != pRN->m_VLeftID.size()) ) ?
00218       0 : &(pRN->m_VLeftID.front());
00219   }

LatticeBase::LeftNode * LatticeBase::leftNode ( LeftID  leftID  )  const [protected]

Definition at line 1031 of file LatticeBase.cxx.

References find(), m_LeftNodes, and m_VLeftID.

Referenced by addLeftNodeToLink(), addRightNodeToLink(), connect(), Lattice::ConnectLR(), leftIDGivenLeft(), linkGivenLeft(), linksGivenLeft(), rightIDGivenLeft(), 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 }

LatticeBase::Link * LatticeBase::linkGivenLeft ( LeftID  leftID  )  [virtual]

Definition at line 385 of file LatticeBase.cxx.

References 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 }

const LatticeBase::Link * LatticeBase::linkGivenLeft ( LeftID  leftID  )  const [virtual]

Definition at line 376 of file LatticeBase.cxx.

References 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 }

LatticeBase::Link * LatticeBase::linkGivenLeft ( LeftItr  leftItr  )  [virtual]

Definition at line 401 of file LatticeBase.cxx.

References linkGivenLeft().

00402 {
00403   return linkGivenLeft(*leftItr);
00404 }

const LatticeBase::Link * LatticeBase::linkGivenLeft ( LeftItr  leftItr  )  const [virtual]

Definition at line 394 of file LatticeBase.cxx.

Referenced by linkGivenLeft().

00395 {
00396   return linkGivenLeft(*leftItr);
00397 }

LatticeBase::Link * LatticeBase::linkGivenRight ( RightID  rightID  )  [virtual]

Definition at line 417 of file LatticeBase.cxx.

References LatticeRightNode::links(), and rightNode().

00418 {
00419   const RightNode* pRN = rightNode(rightID);
00420   return ( (0==pRN) || (1 != pRN->links().size()) ) ? 0 : pRN->links().front();
00421 }

const LatticeBase::Link * LatticeBase::linkGivenRight ( RightID  rightID  )  const [virtual]

Definition at line 409 of file LatticeBase.cxx.

References LatticeRightNode::links(), and rightNode().

00410 {
00411   const RightNode* pRN = rightNode(rightID);
00412   return ( (0==pRN) || (1 != pRN->links().size()) ) ? 0 : pRN->links().front();
00413 }

LatticeBase::Link * LatticeBase::linkGivenRight ( RightItr  rightItr  )  [virtual]

Definition at line 432 of file LatticeBase.cxx.

References linkGivenRight().

00433 {
00434   return linkGivenRight(*rightItr);
00435 }

const LatticeBase::Link * LatticeBase::linkGivenRight ( RightItr  rightItr  )  const [virtual]

Definition at line 425 of file LatticeBase.cxx.

Referenced by linkGivenRight().

00426 {
00427   return linkGivenRight(*rightItr);
00428 }

const LatticeBase::Links & LatticeBase::links (  )  const

Definition at line 318 of file LatticeBase.cxx.

References m_Links.

Referenced by addLeftNodeToLink(), addRightNodeToLink(), Lattice::ConnectLR(), and show().

00319 {
00320   return m_Links;
00321 }

const LatticeBase::Links * LatticeBase::linksGivenLeft ( LeftID  leftID  )  const [virtual]

Definition at line 337 of file LatticeBase.cxx.

References leftNode(), and LatticeLeftNode::links().

00338 {
00339   const LeftNode* pLN = leftNode(leftID);
00340   return (0==pLN) ? 0 : &(pLN->links());
00341 }

const LatticeBase::Links * LatticeBase::linksGivenLeft ( LeftItr  leftItr  )  const [virtual]

Definition at line 345 of file LatticeBase.cxx.

Referenced by cLshared(), connectLinks(), shareLinksLeft(), and sLLshared().

00346 {
00347   return linksGivenLeft(*leftItr);
00348 }

const LatticeBase::Links * LatticeBase::linksGivenRight ( RightID  rID  )  const [virtual]

Definition at line 353 of file LatticeBase.cxx.

References LatticeRightNode::links(), and rightNode().

00354 {
00355   const RightNode* pRN = rightNode(rID);
00356   return (0==pRN) ? 0 : &(pRN->links());
00357 }

const LatticeBase::Links * LatticeBase::linksGivenRight ( RightItr  rightItr  )  const [virtual]

Definition at line 361 of file LatticeBase.cxx.

Referenced by shareLinksRight(), and sLRshared().

00362 {
00363   return linksGivenRight(*rightItr);
00364 }

LatticeBase::LeftNode * LatticeBase::newLeftNode ( LeftID  id  )  [protected]

Definition at line 992 of file LatticeBase.cxx.

References find(), Msg::kWarning, 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 }

LatticeBase::RightNode * LatticeBase::newRightNode ( RightID  id  )  [protected]

Definition at line 1009 of file LatticeBase.cxx.

References find(), Msg::kWarning, m_RightNodes, m_VRightID, and MSG.

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 }

const LatticeBase& LatticeBase::operator= ( const LatticeBase  )  [private]
void LatticeBase::removeLink ( Link link  )  [virtual]

Definition at line 290 of file LatticeBase.cxx.

00291 {
00292   delete &link;
00293 }

virtual const RightID* LatticeBase::rightIDGivenLeft ( LeftItr  leftItr  )  const [inline, virtual]

Definition at line 209 of file LatticeBase.h.

References rightIDGivenLeft().

00210   {
00211     return rightIDGivenLeft(*leftItr);
00212   }

virtual const RightID* LatticeBase::rightIDGivenLeft ( LeftID  leftID  )  const [inline, virtual]

Definition at line 202 of file LatticeBase.h.

References leftNode(), and LatticeLeftNode::m_VRightID.

Referenced by rightIDGivenLeft().

00203   {
00204     const LeftNode* pLN = leftNode(leftID);
00205     return ( (0==pLN) || (1 != pLN->m_VRightID.size()) ) ?
00206       0 : &(pLN->m_VRightID.front());
00207   }

virtual const RightID* LatticeBase::rightIDGivenRight ( RightItr  rightItr  )  const [inline, virtual]

Definition at line 233 of file LatticeBase.h.

References rightIDGivenRight().

00234   {
00235     return rightIDGivenRight(*rightItr);
00236   }

virtual const RightID* LatticeBase::rightIDGivenRight ( RightID  rightID  )  const [inline, virtual]

Definition at line 226 of file LatticeBase.h.

References LatticeRightNode::m_VRightID, and rightNode().

Referenced by rightIDGivenRight().

00227   {
00228     const RightNode* pRN = rightNode(rightID);
00229     return ( (0==pRN) || (1 != pRN->m_VRightID.size()) ) ?
00230       0 : &(pRN->m_VRightID.front());
00231   }

LatticeBase::RightNode * LatticeBase::rightNode ( RightID  rightID  )  const [protected]

Definition at line 1047 of file LatticeBase.cxx.

References find(), m_RightNodes, and m_VRightID.

Referenced by addLeftNodeToLink(), addRightNodeToLink(), connect(), Lattice::ConnectLR(), leftIDGivenRight(), linkGivenRight(), linksGivenRight(), rightIDGivenRight(), 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 }

LatticeBase::Link * LatticeBase::shareLinkLeft ( LeftItr  i1,
LeftItr  i2 
) [virtual]

Definition at line 755 of file LatticeBase.cxx.

References shareLinkLeft().

00756 {
00757   return shareLinkLeft(*i1, *i2);
00758 }

const LatticeBase::Link * LatticeBase::shareLinkLeft ( LeftItr  i1,
LeftItr  i2 
) const [virtual]

Definition at line 748 of file LatticeBase.cxx.

References shareLinkLeft().

00749 {
00750   return shareLinkLeft(*i1, *i2);
00751 }

LatticeBase::Link * LatticeBase::shareLinkLeft ( LeftID  id1,
LeftID  id2 
) [virtual]

Definition at line 741 of file LatticeBase.cxx.

References sLLshared().

00742 {
00743   return const_cast<Link*>(sLLshared(id1,id2));
00744 }

const LatticeBase::Link * LatticeBase::shareLinkLeft ( LeftID  id1,
LeftID  id2 
) const [virtual]

Definition at line 734 of file LatticeBase.cxx.

References sLLshared().

Referenced by shareLinkLeft().

00735 {
00736   return sLLshared(id1,id2);
00737 }

LatticeBase::Link * LatticeBase::shareLinkRight ( RightItr  i1,
RightItr  i2 
) [virtual]

Definition at line 823 of file LatticeBase.cxx.

References shareLinkRight().

00824 {
00825   return shareLinkRight(*i1, *i2);
00826 }

const LatticeBase::Link * LatticeBase::shareLinkRight ( RightItr  i1,
RightItr  i2 
) const [virtual]

Definition at line 816 of file LatticeBase.cxx.

References shareLinkRight().

00817 {
00818   return shareLinkRight(*i1, *i2);
00819 }

LatticeBase::Link * LatticeBase::shareLinkRight ( RightID  id1,
RightID  id2 
) [virtual]

Definition at line 809 of file LatticeBase.cxx.

References sLRshared().

00810 {
00811   return const_cast<Link*>(sLRshared(id1,id2));
00812 }

const LatticeBase::Link * LatticeBase::shareLinkRight ( RightID  id1,
RightID  id2 
) const [virtual]

Definition at line 801 of file LatticeBase.cxx.

References sLRshared().

Referenced by shareLinkRight().

00802 {
00803 
00804   return sLRshared(id1,id2);
00805 }

void LatticeBase::shareLinksLeft ( LeftItr  li1,
LeftItr  li2,
Links links 
) const [virtual]

Definition at line 579 of file LatticeBase.cxx.

References shareLinksLeft().

00580 {
00581   shareLinksLeft(*li1, *li2, links);
00582 }

void LatticeBase::shareLinksLeft ( LeftID  leftID1,
LeftID  leftID2,
Links links 
) const [virtual]

Definition at line 554 of file LatticeBase.cxx.

References find(), linksGivenLeft(), 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 }

void LatticeBase::shareLinksRight ( RightItr  ri1,
RightItr  ri2,
Links links 
) const [virtual]

Definition at line 612 of file LatticeBase.cxx.

References shareLinksRight().

00613 {
00614   shareLinksRight(*ri1, *ri2, links);
00615 }

void LatticeBase::shareLinksRight ( RightID  rightID1,
RightID  rightID2,
Links links 
) const [virtual]

Definition at line 587 of file LatticeBase.cxx.

References find(), linksGivenRight(), 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 }

void LatticeBase::show ( ostream &  os  )  const

Definition at line 898 of file LatticeBase.cxx.

References links(), m_LeftNodes, m_Links, and m_RightNodes.

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 }

void LatticeBase::showLeft ( LeftID  id,
ostream &  os 
) const

Definition at line 945 of file LatticeBase.cxx.

References leftNode(), and LatticeLeftNode::show().

00946 {
00947   leftNode(id)->show(os);
00948 }

void LatticeBase::showLeft ( LeftItr  i,
ostream &  os 
) const

Definition at line 937 of file LatticeBase.cxx.

References leftNode(), and LatticeLeftNode::show().

00938 {
00939   leftNode(*i)->show(os);
00940 }

void LatticeBase::showLink ( LinkItr  i,
ostream &  os 
) const

Definition at line 977 of file LatticeBase.cxx.

00978 {
00979   (*i)->show(os);
00980 }

void LatticeBase::showLink ( Link pLink,
ostream &  os 
) const

Definition at line 969 of file LatticeBase.cxx.

References LatticeLink::show().

00970 {
00971   pLink->show(os);
00972 }

void LatticeBase::showRight ( RightID  id,
ostream &  os 
) const

Definition at line 961 of file LatticeBase.cxx.

References rightNode(), and LatticeRightNode::show().

00962 {
00963   rightNode(id)->show(os);
00964 }

void LatticeBase::showRight ( RightItr  i,
ostream &  os 
) const

Definition at line 953 of file LatticeBase.cxx.

References rightNode(), and LatticeRightNode::show().

00954 {
00955   rightNode(*i)->show(os);
00956 }

const LatticeBase::Link * LatticeBase::sLLshared ( LeftID  id1,
LeftID  id2 
) const [protected]

Definition at line 697 of file LatticeBase.cxx.

References find(), linksGivenLeft(), and vLeftGivenLeft().

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 }

const LatticeBase::Link * LatticeBase::sLRshared ( RightID  id1,
RightID  id2 
) const [protected]

Definition at line 764 of file LatticeBase.cxx.

References find(), linksGivenRight(), and vRightGivenRight().

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 }

string LatticeBase::topologyText (  )  const

Definition at line 875 of file LatticeBase.cxx.

References isLLinkMulti(), isLNodeMulti(), isRLinkMulti(), isRNodeMulti(), LLinkMulti, LNodeMulti, m_Topology, RLinkMulti, and RNodeMulti.

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 }

const LatticeBase::VectorLeftID * LatticeBase::vLeftGivenLeft ( LeftItr  i  )  const [virtual]

Definition at line 458 of file LatticeBase.cxx.

References vLeftGivenLeft().

00459 {
00460   return vLeftGivenLeft(*i);;
00461 }

const LatticeBase::VectorLeftID * LatticeBase::vLeftGivenLeft ( LeftID  leftID  )  const [virtual]

Definition at line 450 of file LatticeBase.cxx.

References 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 }

const LatticeBase::VectorLeftID * LatticeBase::vLeftGivenRight ( RightItr  i  )  const [virtual]

Definition at line 506 of file LatticeBase.cxx.

References vLeftGivenRight().

00507 {
00508   return vLeftGivenRight(*i);
00509 }

const LatticeBase::VectorLeftID * LatticeBase::vLeftGivenRight ( RightID  rightID  )  const [virtual]

Definition at line 498 of file LatticeBase.cxx.

References LatticeRightNode::m_VLeftID, and rightNode().

Referenced by Lattice::GetFarIDs(), and vLeftGivenRight().

00499 {
00500   const RightNode* pRN = rightNode(rightID);
00501   return (0==pRN) ? 0 : &(pRN->m_VLeftID);
00502 }

const LatticeBase::VectorLeftID & LatticeBase::vLeftID (  )  const

Definition at line 304 of file LatticeBase.cxx.

References m_VLeftID.

Referenced by Lattice::GetAllIDs().

00305 {
00306   return m_VLeftID;
00307 }

const LatticeBase::VectorRightID * LatticeBase::vRightGivenLeft ( LeftItr  i  )  const [virtual]

Definition at line 490 of file LatticeBase.cxx.

References vRightGivenLeft().

00491 {
00492   return vRightGivenLeft(*i);
00493 }

const LatticeBase::VectorRightID * LatticeBase::vRightGivenLeft ( LeftID  leftID  )  const [virtual]

Definition at line 482 of file LatticeBase.cxx.

References 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 }

const LatticeBase::VectorRightID * LatticeBase::vRightGivenRight ( RightItr  i  )  const [virtual]

Definition at line 474 of file LatticeBase.cxx.

References vRightGivenRight().

00475 {
00476   return vRightGivenRight(*i);
00477 }

const LatticeBase::VectorRightID * LatticeBase::vRightGivenRight ( RightID  rightID  )  const [virtual]

Definition at line 466 of file LatticeBase.cxx.

References LatticeRightNode::m_VRightID, 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 }

const LatticeBase::VectorRightID & LatticeBase::vRightID (  )  const

Definition at line 311 of file LatticeBase.cxx.

References m_VRightID.

Referenced by Lattice::GetAllIDs().

00312 {
00313   return m_VRightID;
00314 }


Member Data Documentation

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(), links(), show(), and ~LatticeBase().

Definition at line 357 of file LatticeBase.h.

Referenced by newRightNode(), rightNode(), show(), and ~LatticeBase().

bool LatticeBase::m_Topology[5] [protected]

Definition at line 359 of file LatticeBase.h.

Referenced by leftNode(), newLeftNode(), vLeftID(), and ~LatticeBase().

Definition at line 360 of file LatticeBase.h.

Referenced by newRightNode(), rightNode(), vRightID(), and ~LatticeBase().


The documentation for this class was generated from the following files:

Generated on 22 Nov 2017 for loon by  doxygen 1.6.1