You are here

interface UnitsMathematicalOperatorInterface in Units of Measurement 7.2

Interface of mathematical operator.

Hierarchy

Expanded class hierarchy of UnitsMathematicalOperatorInterface

All classes that implement UnitsMathematicalOperatorInterface

File

./units.module, line 1248
Provide API for managing and converting units of measurement.

View source
interface UnitsMathematicalOperatorInterface extends UnitsMathematicalExpression {

  /**
   * Retrieve operand #1 from this mathematical operator.
   *
   * @return UnitsMathematicalExpression
   *   Operand #1 from this mathematical expression
   */
  public function operand1();

  /**
   * Retrieve operand #2 from this mathematical operator.
   *
   * @return UnitsConstantMathematicalExpression
   *   Operand #2 from this mathematical expression
   */
  public function operand2();

  /**
   * Numerically isolate a certain operand of this mathematical expression.
   *
   * Given result of this mathematical expression, numerically, i.e.
   * dimensionlessly isolate a certain operand of this mathematical expression.
   *
   * @param \UnitsMathematicalExpression $equal_expression
   *   Result of this mathematical expression
   * @param int $operand_to_isolate
   *   What operand of this mathematical expression to isolate. Allowed values
   *   are:
   *   - 1: to isolate operand #1
   *   - 2: to isolate operand #2
   *
   * @return UnitsMathematicalExpression
   *   Mathematical expression to which the isolated member numerically equals
   */
  public function isolateOperand(UnitsMathematicalExpression $equal_expression, $operand_to_isolate);

}

Members

Namesort descending Modifiers Type Description Overrides
UnitsMathematicalExpression::containsDimensionlessMember public function Test whether this mathematical expression includes a dimensionless member. 3
UnitsMathematicalExpression::decompose public function Decompose (simplify) this mathematical expression. 3
UnitsMathematicalExpression::dimension public function Determine physical dimension of this mathematical expression. 3
UnitsMathematicalExpression::evaluate public function Numerically evaluate this mathematical expression. 3
UnitsMathematicalExpression::formatQuantity public function Format a certain amount of quantity within this mathematical expression. 3
UnitsMathematicalExpression::isLinear public function Whether this expression is linearly decomposable. 3
UnitsMathematicalExpression::toInfix public function Represent this mathematical expression in human-friendly infix notation. 3
UnitsMathematicalExpression::toPostfix public function Represent this mathematical expression in postfix notation. 3
UnitsMathematicalExpression::unitsMathematicalExpressionSave public function Save the mathematical expression into database. 3
UnitsMathematicalOperatorInterface::isolateOperand public function Numerically isolate a certain operand of this mathematical expression. 1
UnitsMathematicalOperatorInterface::operand1 public function Retrieve operand #1 from this mathematical operator. 1
UnitsMathematicalOperatorInterface::operand2 public function Retrieve operand #2 from this mathematical operator. 1