Matrix CUSUM: a recursive multi-hypothesis change detection algorithm