public class AutomatonNode extends AbstractNode<AutomatonNode,Vector2D,Integer>
AutomatonGraph. Contains the NodeState, the concentrations of ChemicalEntitys
in a ConcentrationContainer, the CellSection, and amongst other attributes. Each node holds
references to its neighbour nodes.| Constructor and Description |
|---|
AutomatonNode(int identifier)
Creates a new plain automaton node.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addPotentialDelta(Delta potentialDelta)
Adds a potential delta to this node.
|
void |
addPotentialDeltas(List<Delta> potentialDeltas)
Adds a list of potential deltas to this node.
|
void |
applyDeltas()
Applies all final deltas and clears the delta list.
|
void |
clearPotentialDeltas()
Clears the list of potential deltas.
|
Map<ChemicalEntity<?>,javax.measure.Quantity<MolarConcentration>> |
getAllConcentrations()
Returns all concentrations of all chemical entities.
|
Map<ChemicalEntity<?>,javax.measure.Quantity<MolarConcentration>> |
getAllConcentrationsForSection(CellSection cellSection)
Returns all concentrations of all chemical entities in the given cell section.
|
Set<ChemicalEntity<?>> |
getAllReferencedEntities()
Returns all chemical entities referenced in this node.
|
Set<CellSection> |
getAllReferencedSections()
Returns all referenced sections in this node.
|
javax.measure.Quantity<MolarConcentration> |
getAvailableConcentration(ChemicalEntity entity,
CellSection cellSection)
Returns the concentration of the given chemical entity in the given compartment.
|
CellSection |
getCellSection()
Returns the primary cell section of this node (Membrane nodes may belong to multiple sections).
|
javax.measure.Quantity<MolarConcentration> |
getConcentration(ChemicalEntity entity)
Gets the concentration of the given chemical entity.
|
ConcentrationContainer |
getConcentrationContainer()
Returns the
ConcentrationContainer used by this node. |
List<Delta> |
getDeltas()
Returns all deltas that are going to be applied to this node.
|
NodeState |
getState()
Returns the node state.
|
boolean |
isObserved()
Returns
true if this node is observed. |
void |
setAvailableConcentration(ChemicalEntity entity,
CellSection cellSection,
javax.measure.Quantity<MolarConcentration> quantity)
Gets the concentration of the given chemical entity in the given compartment.
|
void |
setCellSection(CellSection cellSection)
Sets the cell section of this node and references the node in the corresponding section.
|
void |
setConcentration(ChemicalEntity entity,
double concentration)
Sets the concentration of the entity in mol/l.
|
void |
setConcentration(ChemicalEntity entity,
javax.measure.Quantity<MolarConcentration> quantity)
Sets the concentration of the entity.
|
void |
setConcentrationContainer(ConcentrationContainer concentrationContainer)
Sets the
ConcentrationContainer for this node. |
void |
setConcentrations(double concentration,
ChemicalEntity... entities)
Sets the concentration of the given chemical entities.
|
void |
setObserved(boolean isObserved)
Sets the observed state of this node.
|
void |
setState(NodeState state)
Sets the state.
|
void |
shiftDeltas()
Shifts the deltas from the potential delta list to the final delta list.
|
String |
toString() |
addNeighbour, equals, getDegree, getIdentifier, getNeighbours, getPosition, hashCode, hasNeighbour, removeNeighbour, setIdentifier, setNeighbours, setPositionpublic AutomatonNode(int identifier)
NodeState.AQUEOUS in a "default" compartment with a
SimpleConcentrationContainer.identifier - The identifier of the node.public void setConcentrations(double concentration,
ChemicalEntity... entities)
concentration - The concentration in mol/lentities - The chemical entities.public void setConcentration(ChemicalEntity entity, double concentration)
entity - The entity.concentration - The concentration in mol/l.public void setConcentration(ChemicalEntity entity, javax.measure.Quantity<MolarConcentration> quantity)
entity - The chemical entity.quantity - The quantity.public Map<ChemicalEntity<?>,javax.measure.Quantity<MolarConcentration>> getAllConcentrations()
public Map<ChemicalEntity<?>,javax.measure.Quantity<MolarConcentration>> getAllConcentrationsForSection(CellSection cellSection)
cellSection - The cell section.public javax.measure.Quantity<MolarConcentration> getConcentration(ChemicalEntity entity)
entity - The chemical entity.public void setAvailableConcentration(ChemicalEntity entity, CellSection cellSection, javax.measure.Quantity<MolarConcentration> quantity)
entity - The chemical entity.cellSection - The cell section.quantity - The quantity.public javax.measure.Quantity<MolarConcentration> getAvailableConcentration(ChemicalEntity entity, CellSection cellSection)
entity - The chemical entity.cellSection - The cell section.public List<Delta> getDeltas()
public void addPotentialDeltas(List<Delta> potentialDeltas)
potentialDeltas - The potential deltas.public void addPotentialDelta(Delta potentialDelta)
potentialDelta - The potential delta.public void clearPotentialDeltas()
shiftDeltas() or after rejecting a
time step.public void shiftDeltas()
public void applyDeltas()
public Set<CellSection> getAllReferencedSections()
public Set<ChemicalEntity<?>> getAllReferencedEntities()
public NodeState getState()
public void setState(NodeState state)
state - The node state.public boolean isObserved()
true if this node is observed.true if this node is observed.public void setObserved(boolean isObserved)
isObserved - true if this node is observed.public CellSection getCellSection()
public void setCellSection(CellSection cellSection)
cellSection - The cell section.public ConcentrationContainer getConcentrationContainer()
ConcentrationContainer used by this node.ConcentrationContainer used by this node.public void setConcentrationContainer(ConcentrationContainer concentrationContainer)
ConcentrationContainer for this node.concentrationContainer - The ConcentrationContainer for this node.public String toString()
toString in class AbstractNode<AutomatonNode,Vector2D,Integer>Copyright © 2017. All rights reserved.