Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

Lattice.h

Go to the documentation of this file.
00001 // $Id: Lattice.h,v 1.2 2000/05/10 10:07:04 west Exp $
00002 
00003 #if !defined(LATTICE_H)
00004 #define LATTICE_H
00005 
00006 
00008 // Lattice                                                            //
00009 //                                                                    //
00010 // Package: Lat (Lattice Navigation Model).                           //
00011 //                                                                    //
00012 // Minos version of Lattice.  Unlike CLEO, Minos Lattice inherits 
00013 // privatetly from LatticeBase, instead it owns one and exposes services
00014 // as required.  There is a shift in perspective: as a Minos lattice
00015 // is symmetric (left and right IDs are same type) the view is more
00016 // in terms of near side and far side. Also as a lattice is primarily
00017 // used as a source of vectors that are built into iterators the user
00018 // passes in a vector to be filled rather than having the lattice 
00019 // return a const iterator.
00020 //
00021 // N. West  03/2000                                                   //
00023 
00024 
00025 #include "Lattice/LatticeBase.h"
00026 #include "Lattice/LatticeDef.h"
00027 
00028 
00029 class Lattice : private LatticeBase
00030 {
00031 
00032 public:
00033 
00034 //    N.B. kBoth = kLeft + kRight so can do e.g. far = kBoth - near;
00035 
00036 enum ESide  { kLeft = 1,  kRight = 2, kBoth = 3 };
00037 
00038 typedef LatticeDef::ID               ID;
00039 typedef LatticeDef::VectorID         VectorID;
00040 typedef LatticeBase::LatticeTopology Topology;
00041 typedef LatticeBase::RightNode       RightNode;
00042 typedef LatticeBase::LeftNode        LeftNode;
00043 typedef LatticeBase::Link            Link;
00044 
00045 // Constructors and destructors
00046                            Lattice(const Text_t* lName,
00047                                    const Text_t* rName,
00048                                    Topology i =  LatticeBase::Default,
00049                                    Topology j =  LatticeBase::Default,
00050                                    Topology k =  LatticeBase::Default,
00051                                    Topology l =  LatticeBase::Default);
00052   virtual                 ~Lattice();
00053 
00054 // State testing member functions
00055 
00056   virtual void GetAllIDs(  ESide side, VectorID& ids) const;
00057   virtual void GetFarIDs(  ESide side, ID startFrom, VectorID& ids) const;
00058   virtual void GetNearIDs( ESide side, ID startFrom, VectorID& ids) const;
00059 
00060  
00061 // State changing member functions
00062   virtual Link* ConnectLR(ID leftID, ID rightID);
00063   virtual Link* ConnectLR(ID leftID, Link* link, ID rightID);
00064 
00065   virtual Link* Connect(ESide side, ID nearID, ID farID);
00066   virtual Link* Connect(ESide side, ID nearID, Link* link, ID farID);
00067 
00068 protected:
00069 
00070 
00071 private:
00072 // Data members
00073 
00074   string       fLeftName;
00075   string       fRightName;
00076 };
00077 
00078 
00079 #endif /* LATTICE_H */

Generated on Mon Feb 15 11:06:50 2010 for loon by  doxygen 1.3.9.1