[densematrix] implement cast of DenseVector into DynamicVector