algorithms.c (ShakeNN constructor): Support `None' for func/perso args.