Fast counting of 2D sub-matrices withing a large, dense 2D matrix?

前端 未结 4 1496
庸人自扰
庸人自扰 2020-12-16 06:29

What\'s a good algorithm for counting submatrices within a larger, dense matrix? If I had a single line of data, I could use a suffix tree, but I\'m not sure if generalizing

4条回答
  •  执念已碎
    2020-12-16 06:50

    This sounds similar to template matching. If motivated you could probably transform your original array with the FFT and drop a log from a brute force search. (Nlog(M)) instead of (NM)

提交回复
热议问题