Package org.djunits.vecmat.operations
Interface Hadamard<VM,SI>
- Type Parameters:
VM- the implementing vector or matrix type with generics <?, ?> to, e.g., multiply bySI- the implementing vector or matrix type with generics <SIQuantity, SIUnit>
- All Known Implementing Classes:
Matrix,Matrix1x1,Matrix2x2,Matrix3x3,MatrixNxM,MatrixNxN,QuantityTable,SquareDenseMatrix,SquareMatrix,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 element-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 TypeMethodDescriptiondefault SIdivideElements(Quantity<?, ?> quantity) Divide the elements of this vector, matrix or table by the given quantity.divideElements(VM other) Divide the elements of this vector, matrix or table on an element-by-element basis with those of another collection of the same type (but possibly representing another quantity).Invert the vector, matrix or table on an element-by-element basis.multiplyElements(Quantity<?, ?> quantity) Multiply the elements of this vector, matrix or table by the given quantity.multiplyElements(VM other) Multiply the elements of this vector, matrix or table on an element-by-element basis with those of another collection of the same type (but possibly representing another quantity).
-
Method Details
-
invertElements
SI invertElements()Invert the vector, matrix or table on an element-by-element basis.- Returns:
- a vector, matrix or table with an element-by-element inversion (1/value) of the elements
-
multiplyElements
Multiply the elements of this vector, matrix or table on an element-by-element 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 vector, matrix or table with an element-by-element multiplication of its elements
-
divideElements
Divide the elements of this vector, matrix or table on an element-by-element 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 vector, matrix or table with an element-by-element division of this collection's elements and other's elements
-
multiplyElements
Multiply the elements of this vector, matrix or table by the given quantity.- Parameters:
quantity- the scalar quantity to multiply by- Returns:
- a vector, matrix or table where the elements have been multiplied by the given quantity
-
divideElements
Divide the elements of this vector, matrix or table by the given quantity.- Parameters:
quantity- the scalar quantity to divide by- Returns:
- a vector, matrix or table where the elements have been divided by the given quantity
-