Class ConcentrationContainer


  • public class ConcentrationContainer
    extends Object
    The concentration container manages the concentrations of one updatable. MolarConcentrations of ChemicalEntitys can be set and got by the CellSubsection or CellTopology. If no relevant concentration was registered an empty concentration will be returned.
    Author:
    cl
    • Constructor Detail

      • ConcentrationContainer

        public ConcentrationContainer()
        Creates a new concentration container.
    • Method Detail

      • initializeSubsection

        public void initializeSubsection​(CellSubsection subsection,
                                         CellTopology topology)
        Initializes a new concentration pool for the corresponding subsection and topology.
        Parameters:
        subsection - The subsection.
        topology - The topology.
      • putSubsectionPool

        public void putSubsectionPool​(CellSubsection subsection,
                                      CellTopology topology,
                                      ConcentrationPool concentrationPool)
        Adds a concentration pool, referenced to the subsection and topology.
        Parameters:
        subsection - The subsection.
        topology - The topology.
        concentrationPool - The concentration pool.
      • removeSubsection

        public void removeSubsection​(CellSubsection subsection)
        Removes a subsection, the corresponding topology and concentration pool from the container.
        Parameters:
        subsection - The subsection to remove.
      • removeSubsection

        public void removeSubsection​(CellTopology topology)
        Removes a subsection, the given topology and concentration pool from the container.
        Parameters:
        topology - The topology to remove.
      • getReferencedSubsections

        public Set<CellSubsection> getReferencedSubsections()
        Returns all subsections, referenced in this container.
        Returns:
        All subsections, referenced in this container.
      • getPoolsOfConcentration

        public Collection<ConcentrationPool> getPoolsOfConcentration()
        Returns all concentration pools in this container.
        Returns:
        All concentration pools in this container.
      • getReferencedEntities

        public Set<ChemicalEntity> getReferencedEntities()
        Returns all entities referenced in any concentration pool.
        Returns:
        All entities referenced in any concentration pool.
      • getPool

        public Map.Entry<CellTopology,​ConcentrationPool> getPool​(CellSubsection subsection)
        Returns the topology and concentration pool for the subsection.
        Parameters:
        subsection - The subsection.
        Returns:
        The topology and concentration pool for the subsection.
      • getPool

        public Map.Entry<CellSubsection,​ConcentrationPool> getPool​(CellTopology topology)
        Returns the subsection and concentration pool for the topology.
        Parameters:
        topology - Th topology.
        Returns:
        The subsection and concentration pool for the topology.
      • get

        public double get​(CellSubsection subsection,
                          ChemicalEntity entity)
        Returns the concentration of the entity in the corresponding subsection.
        Parameters:
        subsection - The subsection.
        entity - The entity.
        Returns:
        The concentration of the entity in the corresponding subsection.
      • get

        public double get​(CellTopology topology,
                          ChemicalEntity entity)
        Returns the concentration of the entity in the corresponding topology.
        Parameters:
        topology - The topology.
        entity - The entity.
        Returns:
        The concentration of the entity in the corresponding topology.
      • set

        public void set​(CellSubsection subsection,
                        ChemicalEntity entity,
                        double concentration)
        Sets the concentration of the given entity in the given subsection.
        Parameters:
        subsection - The subsection.
        entity - The entity.
        concentration - The concentration.
      • initialize

        public void initialize​(CellSubsection subsection,
                               ChemicalEntity entity,
                               javax.measure.Quantity<bio.singa.features.quantities.MolarConcentration> concentration)
      • set

        public void set​(CellTopology topology,
                        ChemicalEntity entity,
                        double concentration)
        Sets the concentration of the given entity in the given topology.
        Parameters:
        topology - The topology.
        entity - The entity.
        concentration - The concentration.
      • initialize

        public void initialize​(CellTopology topology,
                               ChemicalEntity entity,
                               javax.measure.Quantity<bio.singa.features.quantities.MolarConcentration> concentration)
      • getSubsection

        public CellSubsection getSubsection​(CellTopology topology)
        Returns the subsection corresponding to the topology.
        Parameters:
        topology - The topology.
        Returns:
        The subsection.
      • getInnerSubsection

        public CellSubsection getInnerSubsection()
        Returns the inner subsection.
        Returns:
        The inner subsection.
      • getOuterSubsection

        public CellSubsection getOuterSubsection()
        Returns the outer subsection.
        Returns:
        The outer subsection.
      • getMembraneSubsection

        public CellSubsection getMembraneSubsection()
        Returns the membrane subsection.
        Returns:
        The membrane subsection.
      • emptyCopy

        public ConcentrationContainer emptyCopy()
        Returns a empty copy of this container, keeping subsections and cell topologies associated.
        Returns:
        A empty copy of this container.
      • fullCopy

        public ConcentrationContainer fullCopy()
        Returns a full copy of this container, keeping concentrations.
        Returns:
        A full copy of this container.