public abstract class AbstractGrowthAtom extends AbstractAtom implements java.lang.Comparable, IElement
Modifier and Type | Field and Description |
---|---|
private double |
angle |
private AbstractGrowthAtomAttributes |
attributes |
private double[] |
bondsProbability
Current probabilities to jump to neighbour position.
|
private Point3D |
cartesianPosition |
private Point3D |
cartesianSuperCell |
private int |
id
Unique identifier.
|
private short |
iHexa
Hexagonal i coordinate.
|
private boolean |
innerPerimeter |
private short |
jHexa
Hexagonal j coordinate.
|
private int |
multiplier |
private int |
occupiedNeighbours |
private boolean |
outerPerimeter |
private boolean |
outside |
private double[][] |
probabilities
Default rates to jump from one type to the other.
|
private double |
probability
Should be the sum of neighbour probabilities.
|
private AbstractProcess[] |
processes
Different processes that atom can do.
|
private byte |
type
Type of the atom.
|
private boolean |
visited
Helper attribute used when counting islands, to check if current atom has
been already visited.
|
ARMCHAIR_EDGE, BULK, CORNER, EDGE, KINK, SICK, TERRACE, ZIGZAG_EDGE, ZIGZAG_WITH_EXTRA
Constructor and Description |
---|
AbstractGrowthAtom(int id,
int numberOfNeighbours)
Dummy constructor to be able to have a proper AgAtom(pos) constructor.
|
AbstractGrowthAtom(int id,
short iHexa,
short jHexa,
int numberOfNeighbours,
int numberOfProcesses) |
Modifier and Type | Method and Description |
---|---|
void |
addOccupiedNeighbour(int value)
An occupied atom is added to current neighbourhood (for the addition, can
be a negative number).
|
void |
addProbability(double probability) |
void |
addRate(byte process,
double rate,
int neighbourPos) |
void |
addToSumRate(byte process,
double rate) |
abstract boolean |
areTwoTerracesTogether() |
boolean |
areTwoTerracesTogetherInPerimeter(AbstractGrowthAtom originAtom)
It has one neighbour.
|
abstract AbstractGrowthAtom |
chooseRandomHop() |
void |
clear()
Resets current atom; TERRACE type, no neighbours, no occupied, no outside and no probability.
|
int |
compareTo(java.lang.Object o)
Compares IDs of two atoms.
|
void |
equalRate(byte process) |
boolean |
equals(java.lang.Object obj)
In general two atoms are equal if the have the same Id.
|
abstract java.util.List |
getAllNeighbours() |
double |
getAngle() |
AbstractGrowthAtomAttributes |
getAttributes() |
double[] |
getBondsProbability() |
double |
getBondsProbability(int i)
Get probability in the given neighbour position.
|
Point3D |
getCartesianPosition() |
Point3D |
getCartesianSuperCell() |
Point3D |
getDepositionPosition() |
double |
getDepositionTime() |
double |
getEdgeRate(byte process,
int neighbourPos) |
int |
getHops() |
int |
getId() |
short |
getiHexa() |
int |
getIslandNumber() |
short |
getjHexa() |
java.util.Set |
getMultiAtomNumber() |
int |
getMultiplier() |
abstract AbstractGrowthAtom |
getNeighbour(int pos) |
int |
getOccupiedNeighbours()
How many neighbours are occupied.
|
abstract int |
getOrientation() |
double |
getProbability() |
double |
getProbability(int pos) |
double |
getProbability(int originType,
int targetType)
Returns the predefined probability (from rates) to jump from origin type to target type.
|
double |
getRate(byte process) |
double |
getSumRate(byte process) |
byte |
getType() |
abstract byte |
getTypeWithoutNeighbour(int posNeighbour)
Returns the type of the neighbour atom if current one would not exist.
|
int |
hashCode()
Every atom will have an unique Id.
|
void |
initialiseRates(double[][] probabilities)
Default rates to jump from one type to the other.
|
boolean |
isInnerPerimeter() |
boolean |
isIsolated()
Checks if the current atom has occupied neighbours.
|
boolean |
isOnList(byte process) |
boolean |
isOuterPerimeter() |
boolean |
isOutside() |
abstract boolean |
isPartOfImmobilSubstrate() |
boolean |
isVisited()
When counting islands, we have to keep track of the visited atoms.
|
abstract void |
obtainRateFromNeighbours() |
abstract double |
probJumpToNeighbour(int originType,
int position) |
double |
remove() |
void |
removeMultiAtomNumber(int multiAtomNumber) |
void |
removeMultiAtoms()
Removes all multi atoms that current atoms belonged to.
|
void |
resetPerimeter() |
void |
resetProbability() |
void |
setAngle(double angle) |
void |
setAttributes(AbstractGrowthAtomAttributes attributes) |
void |
setBondsProbability(double[] bondsProbability) |
void |
setBondsProbability(double value,
int i)
Set the given probability in the given neighbour position.
|
void |
setCartesianPosition(Point3D cartesianPosition) |
void |
setCartesianSuperCell(Point3D cartesianSuperCell) |
void |
setDepositionPosition(Point3D position) |
void |
setDepositionTime(double time)
Stores when the atom has been deposited.
|
void |
setHops(int hops) |
void |
setInnerPerimeter() |
void |
setIslandNumber(int islandNumber) |
void |
setMultiAtomNumber(int multiAtomNumber) |
void |
setMultiplier(int multiplier) |
abstract void |
setNeighbour(AbstractGrowthAtom a,
int pos) |
void |
setOnList(byte process,
boolean onList) |
void |
setOuterPerimeter() |
void |
setOutside(boolean outside) |
void |
setProcceses(AbstractProcess[] processes) |
void |
setRate(byte process,
double rate) |
void |
setSumRate(byte process,
double rate) |
void |
setType(byte type) |
void |
setVisited(boolean visited)
When counting islands, we have to keep track of the visited atoms.
|
void |
swapAttributes(AbstractGrowthAtom atom) |
java.lang.String |
toString() |
abstract double |
updateOneBound(int bond) |
double |
updateRate()
If current atom is not eligible (thus, is immobile) return its probability in negative.
|
getNumberOfNeighbours, getPos, getProbabilities, getRealType, isOccupied, isOnList, isRemoved, setList, setNeighbour, setNumberOfNeighbours, setOccupied, setProbabilities, setRemoved, unRemove
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
isEligible
private byte type
private double[][] probabilities
private double probability
private double[] bondsProbability
private double angle
private boolean outside
private final short iHexa
private final short jHexa
private int multiplier
private boolean visited
private final int id
private boolean innerPerimeter
private boolean outerPerimeter
private Point3D cartesianPosition
private Point3D cartesianSuperCell
private AbstractGrowthAtomAttributes attributes
private int occupiedNeighbours
private AbstractProcess[] processes
public AbstractGrowthAtom(int id, short iHexa, short jHexa, int numberOfNeighbours, int numberOfProcesses)
public AbstractGrowthAtom(int id, int numberOfNeighbours)
id
- atom identifier.numberOfNeighbours
- number of neighbours that each atom has.public AbstractGrowthAtomAttributes getAttributes()
public void setAttributes(AbstractGrowthAtomAttributes attributes)
public int getId()
public short getiHexa()
public short getjHexa()
public Point3D getCartesianPosition()
public void setCartesianPosition(Point3D cartesianPosition)
public Point3D getCartesianSuperCell()
public void setCartesianSuperCell(Point3D cartesianSuperCell)
public double getAngle()
public void setAngle(double angle)
public boolean isOutside()
public void setOutside(boolean outside)
public void setType(byte type)
public void setMultiplier(int multiplier)
public int getMultiplier()
public double[] getBondsProbability()
public double getBondsProbability(int i)
i
- neighbour position.public void setBondsProbability(double[] bondsProbability)
bondsProbability
- the bondsProbability to set.public void setBondsProbability(double value, int i)
value
- probability (rate).i
- neighbour position.public double getProbability()
getProbability
in interface IAtom
public void resetProbability()
public void addProbability(double probability)
public double getProbability(int originType, int targetType)
originType
- origin type, from where the atom is going to jump.targetType
- target type, to where the atom is going to jump.public double getProbability(int pos)
public void setDepositionTime(double time)
time
- deposition time or former time.public double getDepositionTime()
public void setDepositionPosition(Point3D position)
public Point3D getDepositionPosition()
public void setHops(int hops)
public int getHops()
public void setIslandNumber(int islandNumber)
public int getIslandNumber()
public void setMultiAtomNumber(int multiAtomNumber)
public void removeMultiAtomNumber(int multiAtomNumber)
public void removeMultiAtoms()
public java.util.Set getMultiAtomNumber()
public boolean isVisited()
public void setVisited(boolean visited)
visited
- whether current atoms is visited.public boolean isIsolated()
public void setInnerPerimeter()
public void setOuterPerimeter()
public boolean isInnerPerimeter()
public boolean isOuterPerimeter()
public void resetPerimeter()
public int getOccupiedNeighbours()
public void addOccupiedNeighbour(int value)
value
- to be added or removed.public final void setProcceses(AbstractProcess[] processes)
public boolean isOnList(byte process)
public void setOnList(byte process, boolean onList)
public double getEdgeRate(byte process, int neighbourPos)
public void addRate(byte process, double rate, int neighbourPos)
public double getSumRate(byte process)
getSumRate
in interface IElement
public void setSumRate(byte process, double rate)
setSumRate
in interface IElement
public void addToSumRate(byte process, double rate)
addToSumRate
in interface IElement
public abstract byte getTypeWithoutNeighbour(int posNeighbour)
posNeighbour
- current atom.public abstract boolean areTwoTerracesTogether()
public abstract AbstractGrowthAtom chooseRandomHop()
public abstract int getOrientation()
public abstract void obtainRateFromNeighbours()
public abstract double probJumpToNeighbour(int originType, int position)
public abstract void setNeighbour(AbstractGrowthAtom a, int pos)
public abstract AbstractGrowthAtom getNeighbour(int pos)
public abstract java.util.List getAllNeighbours()
public abstract double updateOneBound(int bond)
public abstract boolean isPartOfImmobilSubstrate()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- the other object. Should be atom, but can be any object.public void swapAttributes(AbstractGrowthAtom atom)
public double updateRate()
public void clear()
public void initialiseRates(double[][] probabilities)
probabilities
- Default rates.public boolean areTwoTerracesTogetherInPerimeter(AbstractGrowthAtom originAtom)
originAtom
- has one neighbour and it is a terrace.public int compareTo(java.lang.Object o)
compareTo
in interface java.lang.Comparable
o
- other atom.public java.lang.String toString()
toString
in class java.lang.Object