comparison base/methods.lisp @ 261:8e5f306b7e47

add 'onset-within' generics - does Allen say anything about this?
author Jamie Forth <j.forth@gold.ac.uk>
date Mon, 28 Mar 2011 21:40:37 +0100
parents f5836b2bf334
children 89c20fd8abc0
comparison
equal deleted inserted replaced
260:f5836b2bf334 261:8e5f306b7e47
420 (time= object1 object2)) 420 (time= object1 object2))
421 421
422 (defmethod ends ((object1 anchored-period) 422 (defmethod ends ((object1 anchored-period)
423 (object2 anchored-period)) 423 (object2 anchored-period))
424 (time= (cut-off object1) (cut-off object2))) 424 (time= (cut-off object1) (cut-off object2)))
425
426 ;; Does Allen cover this? Anyway, they are useful for me -JF.
427 (defmethod onset-within ((object1 moment)
428 (object2 standard-anchored-period))
429 (and (time>= object1 object2)
430 (time<= object1 (cut-off object2))))
431
432 (defmethod onset-within-fuzzy ((object1 moment)
433 (object2 standard-anchored-period)
434 (period standard-period))
435 (and (time>= object1 (time- (onset object2) period))
436 (time<= object1 (time- (cut-off object2) period))))
425 437
426 ;; ...and 438 ;; ...and
427 439
428 (defmethod period= ((object1 anchored-period) 440 (defmethod period= ((object1 anchored-period)
429 (object2 anchored-period)) 441 (object2 anchored-period))