Interface Hadamard<VM,SI>

Type Parameters:
VM - the implementing vector or matrix type with generics <?, ?> to, e.g., multiply by
SI - the implementing vector or matrix type with generics <SIQuantity, SIUnit>
All Known Implementing Classes:
Matrix, Matrix1x1, Matrix2x2, Matrix3x3, MatrixNxM, MatrixNxN, QuantityTable, SquareDenseMatrix, SquareMatrix, Table, Vector, Vector1, Vector2, Vector2.Col, Vector2.Row, Vector3, Vector3.Col, Vector3.Row, VectorMatrix, VectorN, VectorN.Col, VectorN.Row

public interface Hadamard<VM,SI>
Hadamard operations are entry-wise operations on vectors, matrices or collections of quantities.

Copyright (c) 2025-2026 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. See for project information https://djunits.org. The DJUNITS project is distributed under a three-clause BSD-style license.

Author:
Alexander Verbraeck
  • Method Summary

    Modifier and Type
    Method
    Description
    default SI
    divideEntries(Quantity<?> quantity)
    Divide the entries of this vector, matrix or table by the given quantity.
    Divide the entries of this vector, matrix or table on an entry-by-entry basis with those of another collection of the same type (but possibly representing another quantity).
    Invert the vector, matrix or table on an entry-by-entry basis.
    Multiply the entries of this vector, matrix or table by the given quantity.
    Multiply the entries of this vector, matrix or table on an entry-by-entry basis with those of another collection of the same type (but possibly representing another quantity).
  • Method Details

    • invertEntries

      SI invertEntries()
      Invert the vector, matrix or table on an entry-by-entry basis.
      Returns:
      a new vector, matrix or table with an entry-by-entry inversion (1/value) of the entries
    • multiplyEntries

      SI multiplyEntries(VM other)
      Multiply the entries of this vector, matrix or table on an entry-by-entry basis with those of another collection of the same type (but possibly representing another quantity).
      Parameters:
      other - the other collection of the same type
      Returns:
      a new vector, matrix or table with an entry-by-entry multiplication of its entries
    • divideEntries

      SI divideEntries(VM other)
      Divide the entries of this vector, matrix or table on an entry-by-entry basis with those of another collection of the same type (but possibly representing another quantity).
      Parameters:
      other - the other collection of the same type
      Returns:
      a new vector, matrix or table with an entry-by-entry division of this collection's entries and other's entries
    • multiplyEntries

      SI multiplyEntries(Quantity<?> quantity)
      Multiply the entries of this vector, matrix or table by the given quantity.
      Parameters:
      quantity - the scalar quantity to multiply by
      Returns:
      a new vector, matrix or table where the entries have been multiplied by the given quantity
    • divideEntries

      default SI divideEntries(Quantity<?> quantity)
      Divide the entries of this vector, matrix or table by the given quantity.
      Parameters:
      quantity - the scalar quantity to divide by
      Returns:
      a new vector, matrix or table where the entries have been divided by the given quantity