def place_rfs(length,count,width):
    """
    place-rfs - returns a list of receptive field index lists
    for use as rf-indices in an rf-array
        
    params
    length = the length of the input vector
    count  = the number of rfs
    width  = the width of each rf
    
    The rfs will be placed such that the first begins at 0 and the
    last ends at length - 1.  The rest will be (approximately) evenly
    spaced in between.  i.e. in 0..(length - width) step (length -
    width)/(count - 1)
    
    Note that they're assumed to overlap!
    """
    if count==1:
        return [(0,length)]

    end_pos = length-width
    step = int(round(end_pos / (count - 1.0)))
    pos = 0
    result = []
    for i in range(count-1):
        result.append((pos,pos+width))
        pos += step
    result.append((end_pos,end_pos+width))
    return result