Show
Ignore:
Timestamp:
03/03/10 10:53:42 (2 years ago)
Author:
pierre
Message:

Wrong commit, speed up was not complete...

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/connectors.py

    r721 r722  
    534534        assert isinstance(space, Space) 
    535535        self.space = space 
    536  
    537          
    538     def connect(self, projection): 
    539         """Connect-up a Projection.""" 
    540         p = {} 
    541         for src in projection.pre.all(): 
    542             local = projection.post._mask_local.flatten() 
    543             d   = self.space.distances(src.position, projection.post.positions, post_mask=local) 
     536         
     537         
     538    def connect(self, projection): 
     539        """Connect-up a Projection.""" 
     540        p         = {} 
     541        local     = projection.post._mask_local.flatten() 
     542        positions = self.space.scale_factor*(projection.post.positions + self.space.offset) 
     543         
     544        for src in projection.pre.all():             
     545            d      = self.space.distances(src.position, positions, post_mask=local) 
    544546            p[src] = eval(self.d_expression).flatten() 
    545547            if p[src].dtype == 'bool':