When representing 2^n x 2^n matrices using quadtrees
I've just found the definition on my textbook and can't imagine what nexp
is supposed to do/mean:
data (Eq a, Show a) => QT a = C a | Q开发者_开发知识库 (QT a) (QT a) (QT a) (QT a)
deriving (Eq, Show)
data (Eq a, Num a, Show a) => Mat a = Mat {
nexp :: Int,
mat :: QT a}
deriving (Eq,Show)
What is the purpose of nexp :: Int
?
My best guess is that nexp
is just the n used in the exp-onent to define how large the matrix is (2^n x 2^n
).
精彩评论