Module pacai.util.util

Various utility functions.

Functions

def arrayInvert(array)

Inverts a matrix stored as a list of lists.

def buildHash(*args)

Build a hash code from different components.

def matrixAsList(matrix, value=True)

Turns a matrix into a list of coordinates matching the specified value

def nearestPoint(pos)

Finds the nearest grid point to a position (discretizes).

def sign(x)

Returns 1 or -1 depending on the sign of x