multiply function

Elementwise Multiplication

Elementwise Multiplication

The elementwise product of two expressions. The first expression must be constant. methods

multiply(lh_exp, rh_exp)

Arguments

  • lh_exp: An Expression , vector, or matrix representing the left-hand value.
  • rh_exp: An Expression , vector, or matrix representing the right-hand value.

Returns

An Expression representing the elementwise product of the inputs.

Examples

A <- Variable(2,2) c <- cbind(c(1,-1), c(2,-2)) expr <- multiply(c, A) obj <- Minimize(norm_inf(expr)) prob <- Problem(obj, list(A == 5)) result <- solve(prob) result$value result$getValue(expr)
  • Maintainer: Anqi Fu
  • License: Apache License 2.0 | file LICENSE
  • Last published: 2024-11-07