Ignore:
Timestamp:
Apr 12, 2005, 12:08:58 PM (20 years ago)
Author:
duncan
Message:

added comments

File:
1 edited

Legend:

Unmodified
Added
Removed
  • inundation/ga/storm_surge/alpha_shape/test_alpha_shape.py

    r987 r1219  
    202202
    203203
     204    def test_expand_pinch(self):
     205        a = [1.0, 1.0]
     206        b = [1.0, 5.0]
     207        c = [4.0, 3.0]
     208        d = [8.0, 5.0]
     209        e = [8.0, 1.0]
     210
     211        alpha = Alpha_Shape([a,b,c,d,e])
     212        alpha.set_boundary_type(raw_boundary=True,
     213                          remove_holes=False,
     214                          smooth_indents=False,
     215                          expand_pinch=True)
     216        result = alpha.get_boundary()
     217        #print "result",result
     218        answer = [(1, 0), (4, 3), (0, 4), (3, 1)]
     219        assert allclose(answer, result)
     220 
     221    def ztest_sharp_indents(self):
     222        a = [1.0, 1.0]
     223        b = [1.0, 5.0]
     224        c = [4.0, 3.0]
     225        d = [8.0, 5.0]
     226        e = [8.0, 1.0]
     227
     228        alpha = Alpha_Shape([a,b,c,d,e])
     229        alpha.set_boundary_type(raw_boundary=True,
     230                          remove_holes=False,
     231                          smooth_indents=False,
     232                          expand_pinch=True)
     233        result = alpha.get_boundary()
     234        #print "result",result
     235        answer = [(1, 0), (4, 3), (0, 4), (3, 1)]
     236        assert allclose(answer, result)     
    204237#-------------------------------------------------------------
    205238if __name__ == "__main__":
Note: See TracChangeset for help on using the changeset viewer.