Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions cvxpy/atoms/max.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,6 @@ def is_atom_log_log_concave(self) -> bool:
"""
return False

def is_smooth(self):
"""max is not a smooth function of its args"""
return False

def is_incr(self, idx) -> bool:
"""Is the composition non-decreasing in argument idx?
"""
Expand Down
4 changes: 2 additions & 2 deletions cvxpy/expressions/expression.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,13 +348,13 @@ def is_concave(self) -> bool:
"""
raise NotImplementedError()

#@abc.abstractmethod
@abc.abstractmethod
def is_linearizable_convex(self) -> bool:
"""Is the expression convex after linearizing all smooth subexpressions?
"""
raise NotImplementedError()

#@abc.abstractmethod
@abc.abstractmethod

@Transurgeon Transurgeon Feb 20, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to make these abstract methods we need to have them in classes that depend on cp.expression
I am not sure how this works, but maybe let's just leave it like this for now.

def is_linearizable_concave(self) -> bool:
"""Is the expression concave after linearizing all smooth subexpressions?
"""
Expand Down
6 changes: 6 additions & 0 deletions cvxpy/transforms/indicator.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,12 @@ def is_concave(self) -> bool:
"""
return False

def is_linearizable_convex(self) -> bool:
return True

def is_linearizable_concave(self) -> bool:
return False

def is_log_log_convex(self) -> bool:
return False

Expand Down
6 changes: 6 additions & 0 deletions cvxpy/transforms/partial_optimize.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,12 @@ def is_concave(self) -> bool:
return self.args[0].is_dcp() and \
type(self.args[0].objective) == Maximize

def is_linearizable_convex(self) -> bool:
return self.is_convex()

def is_linearizable_concave(self) -> bool:
return self.is_concave()

def is_dpp(self, context: str = 'dcp') -> bool:
"""The expression is a disciplined parameterized expression.
"""
Expand Down
Loading