A wide variety of utility procedures and classes.
|
|
|
|
|
|
|
|
|
|
|
|
|
globalDeltaToLocal(pose,
deltaPoint)
Applies inverse of pose to delta using transformDelta. |
|
|
|
sum(items)
Defined to work on items other than numbers, which is not true for
the built-in sum. |
|
|
|
within(v1,
v2,
eps)
Returns:
True if v1 is with eps of
v2
|
|
|
|
nearAngle(a1,
a2,
eps)
Returns:
True if a1 is within eps of
a2 . |
|
|
|
nearlyEqual(x,
y)
Like within, but with the tolerance built in |
|
|
|
mm(t1,
t2)
Multiplies 3 x 3 matrices represented as lists of lists |
|
|
|
fixAnglePlusMinusPi(a)
A is an angle in radians; return an equivalent angle between plus
and minus pi |
|
|
|
fixAngle02Pi(a)
Returns:
return an equivalent angle between 0 and 2 pi |
|
|
|
reverseCopy(items)
Return a list that is a reversed copy of items |
|
|
|
dotProd(a,
b)
Return the dot product of two lists of numbers |
|
|
|
argmax(l,
f)
Returns:
the element of l that has the highest score |
|
|
|
argmaxWithVal(l,
f)
Returns:
the element of l that has the highest score and the
score |
|
|
|
argmaxIndex(l,
f=<function <lambda> at 0x11bbdb0>)
Returns:
the index of l that has the highest score |
|
|
|
argmaxIndices3D(l,
f=<function <lambda> at 0x11bbe30>) |
|
|
|
|
|
clip(v,
vMin,
vMax)
Returns:
If vMin <= v <= vMax , then return v ;
if v < vMin return vMin ; else return
vMax
|
|
|
|
sign(x)
Return 1, 0, or -1 depending on the sign of x |
|
|
|
make2DArray(dim1,
dim2,
initValue)
Return a list of lists representing a 2D array with dimensions dim1
and dim2, filled with initialValue |
|
|
|
make2DArrayFill(dim1,
dim2,
initFun)
Return a list of lists representing a 2D array with dimensions
dim1 and dim2 , filled by calling
initFun(ix, iy) with ix ranging from 0 to
dim1 - 1 and iy ranging from 0 to
dim2-1 . |
|
|
|
make3DArray(dim1,
dim2,
dim3,
initValue)
Return a list of lists of lists representing a 3D array with
dimensions dim1, dim2, and dim3 filled with initialValue |
|
|
|
mapArray3D(array,
f)
Map a function over the whole array. |
|
|
|
makeVector(dim,
initValue)
Return a list of dim copies of initValue |
|
|
|
makeVectorFill(dim,
initFun)
Return a list resulting from applying initFun to values from 0 to
dim-1 |
|
|
|
prettyString(struct)
Make nicer looking strings for printing, mostly by truncating floats |
|
|
|
|
|
gensym(prefix=' i ' )
Call this function to get a new symbol |
|
|
|
logGaussian(x,
mu,
sigma)
Log of the value of the gaussian distribution with mean mu and stdev
sigma at value x |
|
|
|
gaussian(x,
mu,
sigma)
Value of the gaussian distribution with mean mu and stdev sigma at
value x |
|
|
|
lineIndices((i0, j0),
(i1, j1))
Takes two cells in the grid (each described by a pair of integer
indices), and returns a list of the cells in the grid that are on the
line segment between the cells. |
|
|
|
lineIndicesConservative((i0, j0),
(i1, j1))
Takes two cells in the grid (each described by a pair of integer
indices), and returns a list of the cells in the grid that are on the
line segment between the cells. |
|
|
|
findFile(filename)
Takes a filename and returns a complete path to the first instance of
the file found within the subdirectories of the brain directory. |
|
|