Skip to content

Commit

Permalink
minor change
Browse files Browse the repository at this point in the history
  • Loading branch information
luk036 committed Jul 9, 2024
1 parent 5cd4889 commit 5eb9dcd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/ellalgo/oracles/lmi_oracle.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def __init__(self, mat_f, mat_b):
self.mat_f0 = mat_b
self.ldlt_mgr = LDLTMgr(len(mat_b))

def assess_feas(self, x: np.ndarray) -> Optional[Cut]:
def assess_feas(self, xc: np.ndarray) -> Optional[Cut]:
"""
The `assess_feas` function assesses the feasibility of a given input and returns a cut if it is not
feasible.
Expand All @@ -41,7 +41,7 @@ def assess_feas(self, x: np.ndarray) -> Optional[Cut]:

def get_elem(i, j):
return self.mat_f0[i, j] - sum(
Fk[i, j] * xk for Fk, xk in zip(self.mat_f, x)
Fk[i, j] * xk for Fk, xk in zip(self.mat_f, xc)
)

if self.ldlt_mgr.factor(get_elem):
Expand Down
6 changes: 3 additions & 3 deletions src/ellalgo/oracles/lowpass_oracle.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
# *********************************************************************
# number of FIR coefficients (including zeroth)
class LowpassOracle(OracleOptim):
more_alt: bool = True
# more_alt: bool = True
idx1: int = 0

def __init__(
Expand Down Expand Up @@ -83,7 +83,7 @@ def assess_feas(self, x: Arr) -> Optional[ParallelCut]:
Returns:
[type]: [description]
"""
self.more_alt = True
# self.more_alt = True

mdim, ndim = self.spectrum.shape
for _ in range(self.nwpass):
Expand Down Expand Up @@ -126,7 +126,7 @@ def assess_feas(self, x: Arr) -> Optional[ParallelCut]:
if v < 0:
return -col_k, -v # single cut

self.more_alt = False
# self.more_alt = False

# case 1 (unlikely)
if x[0] < 0:
Expand Down

0 comments on commit 5eb9dcd

Please sign in to comment.