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.
利用可能なすべての演算子の中で少し迷っています-行/列(ベクトル)全体を行列に挿入する簡単な方法はありますか?
ベクトルを作成し、配列に変換し、配列に変換された行列と結合し、そのような結合された配列に基づいて新しい行列を作成することを考え始めましたが、見た目よりも醜いです。
val m = DenseMatrix((1, 4, 10, 13), (2, 5, 11, 14), (3, 6, 12, 15)) val v = DenseVector(7, 8, 9) val m2 = DenseMatrix.zeros[Int](3, 5) m2(::, 0 to 1) := m(::, 0 to 1) m2(::, 2) := v m2(::, 3 to 4) := m(::, 2 to 3)
基本的なそよ風機能の詳細については、こちらをご覧ください。