~mrol-dev/mrol/trunk

« back to all changes in this revision

Viewing changes to mrol_mapping/cython/fast.pyx

  • Committer: Julian Ryde
  • Date: 2012-03-04 17:10:07 UTC
  • mto: (16.1.12 trunk) (29.1.2 trunk)
  • mto: This revision was merged to the branch mainline in revision 25.
  • Revision ID: julian_ryde-20120304171007-hfbttvxk2nhmqoad
Changed some functions to take pose objects rather than pose tuples.  Tidied up cost_min so it considers quantised pose steps.

Show diffs side-by-side

added added

removed removed

Lines of Context:
52
52
 
53
53
@cython.boundscheck(False)
54
54
def fillray(dtype_i numcells, np.ndarray[np.float64_t, ndim=1] dir_unit, np.float64_t res, np.ndarray[np.float64_t, ndim=2] ray):
55
 
    cdef int i
56
55
    for i in range(numcells):
57
56
        ray[i] = dir_unit*i*res
58
57
    return ray