aboutsummaryrefslogtreecommitdiff
path: root/util/Search.py
diff options
context:
space:
mode:
authorGravatar rcoh <rcoh@mit.edu>2011-02-01 23:14:12 -0500
committerGravatar rcoh <rcoh@mit.edu>2011-02-01 23:14:12 -0500
commit5a97e7548b0ec44f0d61a724903748197e69df7c (patch)
tree7bb6b8ea7e488949eeb16ae18b0ad2230f1f7c9b /util/Search.py
parent082e4b0c53123dd377da148541f7d98516716862 (diff)
parent482a94fd48627153b923931d6ff21ebf57fad6f7 (diff)
Merge branch 'osc' of github.com:rcoh/SmootLight into osc
Diffstat (limited to 'util/Search.py')
-rw-r--r--util/Search.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/util/Search.py b/util/Search.py
index f7e4b81..1499e23 100644
--- a/util/Search.py
+++ b/util/Search.py
@@ -1,13 +1,13 @@
from bisect import *
def find_le(a, x):
- 'Find rightmost value less than or equal to x'
+ """Find rightmost value less than or equal to x"""
return bisect_right(a, x)-1
def find_ge(a, x):
- 'Find leftmost value greater than x'
+ """Find leftmost value greater than x"""
return bisect_left(a, x)
-#returns parents of nodes that meed a given condition
def parental_tree_search(root, childrenstr, conditionstr):
+ """Returns parents of nodes that meed a given condition"""
ret = []
queue = [root]
while queue: