Surface::Lattice Class Reference

The lattice. More...

List of all members.

Public Types

typedef SiteContainer::iterator iterator
 Define iterator to the lattice.
typedef
SiteContainer::const_iterator 
const_iterator
 Define const iterator to the lattice.
typedef SiteContainer::size_type size_type
 Define the size of the lattice.

Public Member Functions

 Lattice (const size_type length_side)
 Constructor.
 ~Lattice ()
 Destructor.
void Populate (double coverage, const Species &species)
 Populate the lattice.
void Clean ()
 Clean the lattice.
void set_bridge (const Bridge &bridge)
 Set interactions on bridge sites.
Accessors
size_type width ()
 Width (number of columns).
size_type height ()
 Height (number of rows).
Operations on the lattice provided by std::vector
iterator begin ()
iterator end ()
const_iterator begin () const
const_iterator end () const
size_type size () const
bool empty () const
Siteoperator[] (size_type n)
const Site *const operator[] (size_type n) const
Siteat (size_type n)
const Site *const at (size_type n) const


Detailed Description

The lattice is implementef as a vector of pointers to Site and provides most of the accessors of std::vector

Usage
The methods Populate, Clean and SetBridge are provided for convenience but actually only call the functional-programming style functions defined with the same name in this scope.
See also:
Author:
Mathias Laurin <mathias_laurin@users.sourceforge.net>
Date:
2008-10-30

Constructor & Destructor Documentation

Surface::Lattice::Lattice ( const size_type  length_side  )  [inline]

Parameters:
[in] length_side one dimension of the lattice


Member Function Documentation

void Surface::Lattice::Clean (  ) 

Equivalent to

 Lattice::Clean(begin(), end()); 

void Surface::Lattice::Populate ( double  coverage,
const Species species 
)

Equivalent to

 Lattice::Populate(begin(), end(), coverage, species); 

void Surface::Lattice::set_bridge ( const Bridge bridge  ) 

Equivalent to

 Lattice::SetBridge(begin(), end(), bridge); 


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

SourceForge.net Logo Project's page
Generated on Mon Nov 17 00:23:06 2008 for dmcut2 by doxygen 1.5.7