Ignore:
Timestamp:
Nov 22, 2004, 4:50:04 PM (20 years ago)
Author:
duncan
Message:

Optimised the least_squares algorithm for building A matrix

File:
1 edited

Legend:

Unmodified
Added
Removed
  • inundation/ga/storm_surge/pyvolution/quad.py

    r608 r611  
    8181            for child in self:
    8282                if child.contains(x,y):
    83                     branch.append(self)
     83                    brothers = list(self.children)
     84                    brothers.remove(child)
     85                    branch.append(brothers)
    8486                    points, branch = child.search_branch(x,y, branch)
    8587        else:
     
    98100            for child in self:
    99101                if child.contains(x,y):
    100                     branch.append(self)
     102                    brothers = list(self.children)
     103                    brothers.remove(child)
     104                    branch.append(brothers)
    101105                    points, branch = child.search_branch(x,y, branch)
    102106                   
     
    114118            points = []
    115119        else:
    116             larger_cell = self.branch.pop()
    117             #print "larger_cell ", larger_cell.show() # Get_tree()
    118             for child in larger_cell:
    119                 #This means it will also go down the branch known to be bad.
    120                 #So, if things are too slow, this could be speed up
    121                 points += child.retrieve()
     120            three_cells = self.branch.pop()
     121            for cell in three_cells:
     122                #print "cell ", cell.show()
     123                points += cell.retrieve()
    122124        return points
    123125
Note: See TracChangeset for help on using the changeset viewer.