开发者

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).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜