Class RealComplexDenseSparseVectorOps

java.lang.Object
org.flag4j.linalg.ops.dense_sparse.coo.real_complex.RealComplexDenseSparseVectorOps

public final class RealComplexDenseSparseVectorOps extends Object
This class provides low level methods for computing ops between a real/complex dense/sparse vector and a complex/real sparse/dense vector.
  • Method Details

    • add

      public static CVector add(Vector src1, CooCVector src2)
      Adds a real dense matrix to a complex sparse matrix.
      Parameters:
      src1 - First matrix.
      src2 - Second matrix.
      Returns:
      The result of the vector addition.
      Throws:
      IllegalArgumentException - If the vectors do not have the same shape.
    • sub

      public static CVector sub(Vector src1, CooCVector src2)
      Subtracts a complex sparse vector from a real dense vector.
      Parameters:
      src1 - First vector.
      src2 - Second vector.
      Returns:
      The result of the vector subtraction.
      Throws:
      IllegalArgumentException - If the vectors do not have the same shape.
    • sub

      public static CVector sub(CooCVector src1, Vector src2)
      Subtracts a complex dense vector from a complex sparse vector.
      Parameters:
      src1 - Sparse vector.
      src2 - Dense vector.
      Returns:
      The result of the vector subtraction.
      Throws:
      IllegalArgumentException - If the vectors do not have the same shape.
    • sub

      public static CVector sub(CVector src1, CooVector src2)
      Subtracts a real sparse vector from a complex dense vector.
      Parameters:
      src1 - First vector.
      src2 - Second vector.
      Returns:
      The result of the vector subtraction.
      Throws:
      IllegalArgumentException - If the vectors do not have the same shape.
    • elemMult

      public static CooCVector elemMult(CVector src1, CooVector src2)
      Computes the element-wise multiplication of a complex dense vector with a real sparse vector.
      Parameters:
      src1 - Dense vector.
      src2 - Sparse vector.
      Returns:
      The result of the element-wise multiplication.
      Throws:
      IllegalArgumentException - If the two vectors are not the same size.
    • elemDiv

      public static CooCVector elemDiv(CooVector src1, CVector src2)
      Compute the element-wise division between a sparse vector and a dense vector.
      Parameters:
      src1 - First vector in the element-wise division.
      src2 - Second vector in the element-wise division.
      Returns:
      The result of the element-wise vector division.