Class Tank.Layer

java.lang.Object
com.amalgamasimulation.discreterate.Tank.Layer
Enclosing class:
Tank<T>

public class Tank.Layer extends Object
Layer represents a portion of material mix contained within a Tank.
Author:
Alexander Morozov
  • Method Details

    • getAmount

      public double getAmount()
      Returns the total amount of all materials inside this Layer.
      Returns:
      total amount of materials
    • getProportions

      public Accumulator<T> getProportions()
      Returns an Accumulator that describes the proportions of material amounts inside this Layer.

      Each element of the returned Accumulator corresponds to a material in this Layer. The amount of each material in the Accumulator is the ratio of the material's amount in the Layer to the total materials amount in the Layer. The sum of amounts in the Accumulator is equal to 1.

      Returns:
      Accumulator describing the quantitative proportions of materials in this Layer