2017-01-15 71 views

回答

0

不幸的是,沒有內置函數來做到這一點。這應該做的伎倆,雖然:

SimpleMatrix ones = new SimpleMatrix(1,10); 
ones.set(1); 
SimpleMatrix m = SimpleMatrix.random64(10,20,-1,2,new Random()); 

SimpleMatrix sum = ones.mult(m); 
SimpleMatrix mean = sum.divide(10);