LatticeLeftNode 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 (RightID) const
Bool_t sharesLinksWith (LeftID) const
LeftID identifier () const
void show (ostream &) const

Private Member Functions

 LatticeLeftNode (const LatticeDef::StoreType &)
 LatticeLeftNode (LeftID)
 ~LatticeLeftNode ()
 LatticeLeftNode ()
 LatticeLeftNode (const LatticeLeftNode &)
const LatticeLeftNodeoperator= (const LatticeLeftNode &)

Private Attributes

Linksm_Links
VectorLeftIDm_VLeftID
VectorRightIDm_VRightID
const LeftID m_ID

Friends

class LatticeBase

Detailed Description

Definition at line 51 of file LatticeNode.h.


Member Typedef Documentation

Definition at line 63 of file LatticeNode.h.

Definition at line 68 of file LatticeNode.h.

typedef VectorLeftID ::const_iterator LatticeLeftNode::LeftItr

Definition at line 75 of file LatticeNode.h.

Definition at line 65 of file LatticeNode.h.

Definition at line 64 of file LatticeNode.h.

typedef Links ::const_iterator LatticeLeftNode::LinkItr

Definition at line 77 of file LatticeNode.h.

Definition at line 73 of file LatticeNode.h.

Definition at line 69 of file LatticeNode.h.

typedef VectorRightID::const_iterator LatticeLeftNode::RightItr

Definition at line 76 of file LatticeNode.h.

Definition at line 66 of file LatticeNode.h.

Definition at line 71 of file LatticeNode.h.

Definition at line 72 of file LatticeNode.h.


Constructor & Destructor Documentation

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

Definition at line 78 of file LatticeNode.cxx.

00079   : m_Links   (*new Links),
00080     m_VLeftID (*new VectorLeftID),
00081     m_VRightID(*new VectorRightID),
00082     m_ID      (data.identifier())
00083 {
00084 }

LatticeLeftNode::LatticeLeftNode ( LeftID  id  )  [private]

Definition at line 87 of file LatticeNode.cxx.

00088   : m_Links   (*new Links),
00089     m_VLeftID (*new VectorLeftID),
00090     m_VRightID(*new VectorRightID),
00091     m_ID      (id)
00092 {
00093 }

LatticeLeftNode::~LatticeLeftNode (  )  [private]

Definition at line 96 of file LatticeNode.cxx.

References m_Links, m_VLeftID, and m_VRightID.

00097 {
00098   delete &m_Links;
00099   delete &m_VLeftID;
00100   delete &m_VRightID;
00101 }

LatticeLeftNode::LatticeLeftNode (  )  [private]
LatticeLeftNode::LatticeLeftNode ( const LatticeLeftNode  )  [private]

Member Function Documentation

LatticeLeftNode::LeftID LatticeLeftNode::identifier (  )  const

Definition at line 233 of file LatticeNode.cxx.

References m_ID.

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

00234 {
00235   return m_ID;
00236 }

Bool_t LatticeLeftNode::isLinkedTo ( RightID  id  )  const

Definition at line 215 of file LatticeNode.cxx.

References find(), and m_VRightID.

00216 {
00217   return (find(m_VRightID.begin(),m_VRightID.end(),id) == m_VRightID.end()) ?
00218           0 : 1;
00219 }

const LatticeLeftNode::Links & LatticeLeftNode::links (  )  const

Definition at line 207 of file LatticeNode.cxx.

References m_Links.

Referenced by Lattice::ConnectLR(), LatticeBase::linkGivenLeft(), LatticeBase::linksGivenLeft(), and show().

00208 {
00209   return m_Links;
00210 }

const LatticeLeftNode& LatticeLeftNode::operator= ( const LatticeLeftNode  )  [private]
Bool_t LatticeLeftNode::sharesLinksWith ( LeftID  id  )  const

Definition at line 224 of file LatticeNode.cxx.

References find(), and m_VLeftID.

00225 {
00226   return (find(m_VLeftID.begin(),m_VLeftID.end(),id) == m_VLeftID.end()) ?
00227           0 : 1;
00228 }

void LatticeLeftNode::show ( ostream &  os  )  const

Definition at line 136 of file LatticeNode.cxx.

References identifier(), links(), m_VLeftID, and m_VRightID.

Referenced by LatticeBase::showLeft().

00137 {
00138   os << " Left data ID "       << identifier()      << ":"
00139      << endl
00140      << "   has              " << links().size()    << " links,"
00141      << endl
00142      << "   connecting it to " << m_VRightID.size() << " right data: ";
00143 
00144   // Right data.
00145   typedef LatticeLeftNode::RightItr Ritr;
00146   Ritr i    = m_VRightID.begin();
00147   Ritr iEnd = m_VRightID.end();
00148   for ( ; i != iEnd; ++i)
00149   {
00150     os << " " << *i;
00151   }
00152   os << endl
00153      << "   and shared with  " << m_VLeftID.size() << " left data:";
00154 
00155   // Left data.
00156   typedef LatticeLeftNode::LeftItr Litr;
00157   Litr  j    = m_VLeftID.begin();
00158   Litr  jEnd = m_VLeftID.end();
00159   for ( ; j != jEnd; ++j)
00160   {
00161     os << " " << *j;
00162   }
00163   os << endl;
00164 }


Friends And Related Function Documentation

friend class LatticeBase [friend]

Definition at line 58 of file LatticeNode.h.


Member Data Documentation

const LeftID LatticeLeftNode::m_ID [private]

Definition at line 111 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