Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Was looking for a function which returns a one diamensional SimpleMatrix giving the mean.
不幸的是,没有内置函数可以做到这一点。不过,这应该可以解决问题:
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);