Skip to content

Commit

Permalink
Outline of tasks for faster linear algorithm for extending partial as…
Browse files Browse the repository at this point in the history
…signments
  • Loading branch information
kb1dds committed Jun 19, 2018
1 parent 93cf55e commit 250bf31
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion pysheaf/pysheaf.py
Original file line number Diff line number Diff line change
Expand Up @@ -872,8 +872,21 @@ def minimalExtend(self,assignment, activeCells=None, testSupport=None, method='n
ac=[idx for idx in range(len(self.cells)) if idx not in support]
else:
ac=activeCells

if method == 'KernelProj':
if not self.isLinear():
raise NotImplementedError('KernelProj only works for sheaves of vector spaces')

if ord != 2:
warn('Kernel projection requires order 2 in fuseAssignment')

# Build block matrix in which block columns are stalks over activeCells and block rows are stalks over cells supported in assignment
# Blocks are ultimate restriction maps (not just one hops!)

# Use (constrained?) least squares to solve for global assignment given existing assignment

if self.isNumeric():
# Deserialize assignment
elif self.isNumeric():
initial_guess, bounds = self.serializeAssignment(assignment,ac)
res=scipy.optimize.minimize( fun = lambda sec: self.consistencyRadius(self.deserializeAssignment(sec,ac,assignment), testSupport=testSupport, ord=ord),
x0 = initial_guess,
Expand Down

0 comments on commit 250bf31

Please sign in to comment.