CLN: move related algos to core.algorithms