Skip to content

Commit

Permalink
Renaming multiply to left_multiply
Browse files Browse the repository at this point in the history
  • Loading branch information
Gregwar committed Jul 21, 2024
1 parent 6a45a5e commit 4e3c6d1
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion bindings/expose-problem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ void exposeProblem()
.def(self - float())
.def(float() - self)
.def(other<Eigen::MatrixXd>() * self)
.def("multiply", &Expression::multiply)
.def("left_multiply", &Expression::left_multiply)
// Compare to build constraints
.def(self >= self)
.def(self <= self)
Expand Down
2 changes: 1 addition & 1 deletion python/tests/problem_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def test_expression_arithmetics(self):
# self.assertTrue(np.linalg.norm((np.ones(16) + e).b - np.ones(16)) < 1e-6)

# Checking multiplication
self.assertNumpyEqual(e.multiply(np.eye(16) * 2).A, 2 * np.eye(16))
self.assertNumpyEqual(e.left_multiply(np.eye(16) * 2).A, 2 * np.eye(16))

def test_expressions(self):
"""
Expand Down
2 changes: 1 addition & 1 deletion src/placo/problem/expression.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ Expression operator*(const Eigen::MatrixXd M, const Expression& e_)
return e;
}

Expression Expression::multiply(const Eigen::MatrixXd M)
Expression Expression::left_multiply(const Eigen::MatrixXd M)
{
return M * (*this);
}
Expand Down
2 changes: 1 addition & 1 deletion src/placo/problem/expression.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ class Expression
* @param M matrix
* @return expression
*/
Expression multiply(const Eigen::MatrixXd M);
Expression left_multiply(const Eigen::MatrixXd M);

/**
* @brief Reduces a multi-rows expression to the sum of its items
Expand Down

0 comments on commit 4e3c6d1

Please sign in to comment.