LatticeRightNode Class Reference

#include <LatticeNode.h>

List of all members.

Public Types

typedef LatticeBase Lattice
typedef LatticeLink Link
typedef LatticeLeftNode LeftNode
typedef LatticeRightNode RightNode
typedef LatticeDef::LeftID LeftID
typedef LatticeDef::RightID RightID
typedef LatticeDef::VectorLeftID VectorLeftID
typedef LatticeDef::VectorRightID VectorRightID
typedef LatticeDef::Links Links
typedef
VectorLeftID::const_iterator 
LeftItr
typedef
VectorRightID::const_iterator 
RightItr
typedef Links::const_iterator LinkItr

Public Member Functions

const Linkslinks () const
Bool_t isLinkedTo (LeftID) const
Bool_t sharesLinksWith (RightID) const
RightID identifier () const
void show (ostream &) const

Private Member Functions

 LatticeRightNode (const LatticeDef::StoreType &)
 LatticeRightNode (RightID)
 ~LatticeRightNode ()
 LatticeRightNode ()
 LatticeRightNode (const LatticeRightNode &)
const LatticeRightNodeoperator= (const LatticeRightNode &)

Private Attributes

Linksm_Links
VectorRightIDm_VRightID
VectorLeftIDm_VLeftID
const RightID m_ID

Friends

class LatticeBase

Detailed Description

Definition at line 118 of file LatticeNode.h.


Member Typedef Documentation

Definition at line 130 of file LatticeNode.h.

Definition at line 135 of file LatticeNode.h.

typedef VectorLeftID ::const_iterator LatticeRightNode::LeftItr

Definition at line 142 of file LatticeNode.h.

Definition at line 132 of file LatticeNode.h.

Definition at line 131 of file LatticeNode.h.

typedef Links ::const_iterator LatticeRightNode::LinkItr

Definition at line 144 of file LatticeNode.h.

Definition at line 140 of file LatticeNode.h.

Definition at line 136 of file LatticeNode.h.

typedef VectorRightID::const_iterator LatticeRightNode::RightItr

Definition at line 143 of file LatticeNode.h.

Definition at line 133 of file LatticeNode.h.

Definition at line 138 of file LatticeNode.h.

Definition at line 139 of file LatticeNode.h.


Constructor & Destructor Documentation

LatticeRightNode::LatticeRightNode ( const LatticeDef::StoreType data  )  [private]

Definition at line 107 of file LatticeNode.cxx.

00108   : m_Links   (*new Links),
00109     m_VRightID(*new VectorRightID),
00110     m_VLeftID (*new VectorLeftID),
00111     m_ID      (data.identifier())
00112 { 
00113 }

LatticeRightNode::LatticeRightNode ( RightID  id  )  [private]

Definition at line 116 of file LatticeNode.cxx.

00117   : m_Links   (*new Links),
00118     m_VRightID(*new VectorRightID),
00119     m_VLeftID (*new VectorLeftID),
00120     m_ID      (id)
00121 { 
00122 }

LatticeRightNode::~LatticeRightNode (  )  [private]

Definition at line 125 of file LatticeNode.cxx.

References m_Links, m_VLeftID, and m_VRightID.

00126 { delete &m_Links;
00127   delete &m_VLeftID;
00128   delete &m_VRightID;
00129 }

LatticeRightNode::LatticeRightNode (  )  [private]
LatticeRightNode::LatticeRightNode ( const LatticeRightNode  )  [private]

Member Function Documentation

LatticeRightNode::RightID LatticeRightNode::identifier (  )  const

Definition at line 271 of file LatticeNode.cxx.

References m_ID.

Referenced by LatticeLink::LatticeLink(), and show().

00272 {
00273   return m_ID;
00274 }

Bool_t LatticeRightNode::isLinkedTo ( LeftID  id  )  const

Definition at line 253 of file LatticeNode.cxx.

References find(), and m_VLeftID.

00254 {
00255   return (find(m_VLeftID.begin(),m_VLeftID.end(),id) == m_VLeftID.end()) ?
00256           0 : 1;
00257 }

const LatticeRightNode::Links & LatticeRightNode::links (  )  const

Definition at line 245 of file LatticeNode.cxx.

References m_Links.

Referenced by Lattice::ConnectLR(), LatticeBase::linkGivenRight(), LatticeBase::linksGivenRight(), and show().

00246 {
00247   return m_Links;
00248 }

const LatticeRightNode& LatticeRightNode::operator= ( const LatticeRightNode  )  [private]
Bool_t LatticeRightNode::sharesLinksWith ( RightID  id  )  const

Definition at line 262 of file LatticeNode.cxx.

References find(), and m_VRightID.

00263 {
00264   return (find(m_VRightID.begin(),m_VRightID.end(),id) == m_VRightID.end()) ?
00265           0 : 1;
00266 }

void LatticeRightNode::show ( ostream &  os  )  const

Definition at line 168 of file LatticeNode.cxx.

References identifier(), links(), Munits::m, m_VLeftID, m_VRightID, and n.

Referenced by LatticeBase::showRight().

00169 {
00170   os << " Right data ID "      << identifier()     << ":"
00171      << endl
00172      << "   has              " << links().size()   << " links,"
00173      << endl
00174      << "   connecting it to " << m_VLeftID.size() << " left data: ";
00175 
00176   // Left data.
00177   typedef LatticeRightNode::LeftItr Litr;
00178   Litr m    = m_VLeftID.begin();
00179   Litr mEnd = m_VLeftID.end();
00180   for ( ; m != mEnd; ++m)
00181   {
00182     os << " " << *m;
00183   }
00184   os << endl
00185      << "   and shared with  " << m_VRightID.size() << " right data:";
00186   // Right data.
00187   typedef LatticeRightNode::RightItr Ritr;
00188   Ritr n    = m_VRightID.begin();
00189   Ritr nEnd = m_VRightID.end();
00190   for ( ; n != nEnd; ++n)
00191   {
00192     os << " " << *n;
00193   }
00194   os << endl;
00195 }


Friends And Related Function Documentation

friend class LatticeBase [friend]

Definition at line 125 of file LatticeNode.h.


Member Data Documentation

Definition at line 177 of file LatticeNode.h.

Referenced by identifier().


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

Generated on 11 Jan 2018 for loon by  doxygen 1.6.1