Langmuir
Simulation
|
A class that abstractly represents an object that can occupy grid sites. More...
#include <agent.h>
Public Types | |
enum | Type { Empty = 0, Electron = 1, Hole = 2, Defect = 3, Source = 4, Drain = 5, SIZE = 6 } |
An identifier for the type of Agent. More... | |
Public Member Functions | |
Agent (Type type, World &world, int site=0, QObject *parent=0) | |
Create an Agent. More... | |
virtual | ~Agent () |
Destroy Agent. More... | |
const QVector< int > & | getNeighbors () const |
Get Agent neighbor list. More... | |
void | setNeighbors (QVector< int > neighbors) |
Set Agent neighbor list. More... | |
int | getCurrentSite () const |
Get Agent current site. More... | |
int | getFutureSite () const |
Get Agent future site. More... | |
void | setCurrentSite (int site) |
Set Agent current site. More... | |
void | setFutureSite (int site) |
Set Agent future site. More... | |
Type | getType () const |
Get Agent::Type enum. More... | |
World & | getWorld () const |
Get Langmuir::World reference. More... | |
Static Public Member Functions | |
static QString | toQString (const Agent::Type e) |
Convert Agent type enum to QString. More... | |
Protected Attributes | |
int | m_site |
Current site the Agent occupies. More... | |
int | m_fSite |
Future site the Agent will occupy. More... | |
World & | m_world |
Reference to World object. More... | |
QVector< int > | m_neighbors |
List fo neighboring site ids. More... | |
Type | m_type |
Agent Type enum. More... | |
A class that abstractly represents an object that can occupy grid sites.
Agents can be Electrons, Holes, Defects, Sources, or Drains. The Agent class encodes basic information that all agents have, regardless of their type. For examples, all agents occupy a grid site, have knowledge of their neighboring sites, and know their own type.
|
inlinevirtual |
Destroy Agent.
|
inline |
Get Agent current site.
|
inline |
Get Agent future site.
|
inline |
Get Agent neighbor list.
|
inline |
Get Agent::Type enum.
|
inline |
Get Langmuir::World reference.
|
inline |
Set Agent current site.
|
inline |
Set Agent future site.
|
inline |
Set Agent neighbor list.
|
inlinestatic |
Convert Agent type enum to QString.
|
protected |
Future site the Agent will occupy.
|
protected |
List fo neighboring site ids.
|
protected |
Current site the Agent occupies.