Skip to content

Instantly share code, notes, and snippets.

@ericcornelissen
ericcornelissen / lib.rs
Last active December 18, 2023 23:15
A Rust implementation of an algorithm that converts a linearly stored m-by-m matrix A into a linear store of the q-by-q submatrices of A.
// SPDX-License-Identifier: MIT-0
/// Converts a linearly stored m-by-m matrix A into a linear store of the q-by-q
/// submatrices of A. For example, given the 4-by-4 matrix:
///
/// ```no-test
/// in = [ a b c d
/// e f g h
/// h i j k
/// l m n o ]