can set matrix type(normal or sparse) when construct matrix