るりまサーチ (Ruby 2.7.0)

最速Rubyリファレンスマニュアル検索!
49件ヒット [1-49件を表示] (0.041秒)
トップページ > ライブラリ:matrix[x] > バージョン:2.7.0[x] > クエリ:matrix[x] > クエリ:ErrDimensionMismatch[x]

別のキーワード

  1. matrix each
  2. matrix find_index
  3. matrix index
  4. matrix map
  5. matrix collect

検索結果

ExceptionForMatrix::ErrDimensionMismatch (87007.0)

行列/ベクトル計算時に次元が合わない場合に発生する例外です。

行列/ベクトル計算時に次元が合わない場合に発生する例外です。

Matrix.combine(*matrices) {|*elements| ... } -> Matrix (51484.0)

要素ごとにブロックを呼び出した結果を組み合わせた Matrix を返します。

...ごとにブロックを呼び出した結果を組み合わせた Matrix を返します。

//emlist[例][ruby]{
require 'matrix'
x = Matrix[[6, 6], [4, 4]]
y = Matrix[[1, 2], [3, 4]]
Matrix
.combine(x, y) {|a, b| a - b} # => Matrix[[5, 4], [1, 0]]
//}

@param matrices 並べる行列。すべて...
...の行列の行数と列数が一致していなければならない
@raise ExceptionForMatrix::ErrDimensionMismatch 行や列の要素数が一致しない時に発生します
@see Matrix#combine...

Matrix#hstack(*matrices) -> Matrix (51454.0)

行列 self と matrices を横に並べた行列を生成します。

...self と matrices を横に並べた行列を生成します。

Matrix
.hstack(self, *matrices) と同じです。

//emlist[例][ruby]{
require 'matrix'
x = Matrix[[1, 2], [3, 4]]
y = Matrix[[5, 6], [7, 8]]
x.hstack(y) # => Matrix[[1, 2, 5, 6], [3, 4, 7, 8]]
//}

@param matrices 並べる行列。...
...すべての行列の行数がselfの行数と一致していなければならない
@raise ExceptionForMatrix::ErrDimensionMismatch 行数の異なる行列がある場合に発生します

@see Matrix.hstack, Matrix#vstack...

Matrix.hstack(*matrices) -> Matrix (51454.0)

行列 matrices を横に並べた行列を生成します。

...[例][ruby]{
require 'matrix'
x = Matrix[[1, 2], [3, 4]]
y = Matrix[[5, 6], [7, 8]]
Matrix
.hstack(x, y) # => Matrix[[1, 2, 5, 6], [3, 4, 7, 8]]
//}

@param matrices 並べる行列。すべての行列の行数が一致していなければならない
@raise ExceptionForMatrix::ErrDimensionMismatch...
...行数の異なる行列がある場合に発生します
@see Matrix.vstack, Matrix#hstack...

Matrix.vstack(*matrices) -> Matrix (51454.0)

行列 matrices を縦に並べた行列を生成します。

...][ruby]{
require 'matrix'
x = Matrix[[1, 2], [3, 4]]
y = Matrix[[5, 6], [7, 8]]
Matrix
.vstack(x, y) # => Matrix[[1, 2], [3, 4], [5, 6], [7, 8]]
//}

@param matrices 並べる行列。すべての行列の列数が一致していなければならない
@raise ExceptionForMatrix::ErrDimensionMismatch...
...列数の異なる行列がある場合に発生します
@see Matrix.hstack, Matrix#vstack...

絞り込み条件を変える

Matrix#eigen -> Matrix::EigenvalueDecomposition (51403.0)

行列の固有値と左右の固有ベクトルを保持したオブジェクトを返します。

...行列の固有値と左右の固有ベクトルを保持したオブジェクトを返します。

Matrix
::EigenvalueDecomposition は to_ary を定義しているため、
多重代入によって3つの行列(右固有ベクトル、固有値行列、左固有ベクトル)
を得ることがで...
...ruby]{
require 'matrix'
m = Matrix[[1, 2], [3, 4]]
v, d, v_inv = m.eigensystem
d.diagonal? # => true
v.inv == v_inv # => true
(v * d * v_inv).round(5) == m # => true
//}

@raise ExceptionForMatrix::ErrDimensionMismatch 行列が正方行列でない場合に発生します
@see Matrix::EigenvalueDec...

Matrix#eigensystem -> Matrix::EigenvalueDecomposition (51403.0)

行列の固有値と左右の固有ベクトルを保持したオブジェクトを返します。

...行列の固有値と左右の固有ベクトルを保持したオブジェクトを返します。

Matrix
::EigenvalueDecomposition は to_ary を定義しているため、
多重代入によって3つの行列(右固有ベクトル、固有値行列、左固有ベクトル)
を得ることがで...
...ruby]{
require 'matrix'
m = Matrix[[1, 2], [3, 4]]
v, d, v_inv = m.eigensystem
d.diagonal? # => true
v.inv == v_inv # => true
(v * d * v_inv).round(5) == m # => true
//}

@raise ExceptionForMatrix::ErrDimensionMismatch 行列が正方行列でない場合に発生します
@see Matrix::EigenvalueDec...

Matrix#entrywise_product(m) -> Matrix (51403.0)

アダマール積(要素ごとの積)を返します。

...ダマール積(要素ごとの積)を返します。

@raise ExceptionForMatrix::ErrDimensionMismatch 行や列の要素数が一致しない時に発生します。

//emlist[例][ruby]{
require 'matrix'

Matrix
[[1,2], [3,4]].hadamard_product(Matrix[[1,2], [3,2]]) # => Matrix[[1, 4], [9, 8]]
//}...

Matrix#hadamard_product(m) -> Matrix (51403.0)

アダマール積(要素ごとの積)を返します。

...ダマール積(要素ごとの積)を返します。

@raise ExceptionForMatrix::ErrDimensionMismatch 行や列の要素数が一致しない時に発生します。

//emlist[例][ruby]{
require 'matrix'

Matrix
[[1,2], [3,4]].hadamard_product(Matrix[[1,2], [3,2]]) # => Matrix[[1, 4], [9, 8]]
//}...

Matrix#adjugate -> Matrix (51400.0)

余因子行列を返します。

...余因子行列を返します。

//emlist[例][ruby]{
require 'matrix'
Matrix
[[7,6],[3,9]].adjugate # => Matrix[[9, -6], [-3, 7]]
//}

@raise ExceptionForMatrix::ErrDimensionMismatch 行列が正方でない場合に発生します。
@see Matrix#cofactor...

絞り込み条件を変える

Matrix#*(m) -> Matrix | Vector (51331.0)

self に行列またはベクトル m を右から乗じた行列を返します。

...を返します。

m が Vector オブジェクトなら返り値も Vector オブジェクトになります。

@param m 右からの乗算が定義可能な行列やベクトルを指定します。

@raise ExceptionForMatrix::ErrDimensionMismatch 次元が合わない場合に発生します...

Matrix#/(m) -> Matrix (51331.0)

self に行列 m の逆行列を右から乗じた行列を返します。

...@param m 逆行列を右から乗算する行列。可逆行列でselfと乗算可能な行列を指定します。

@raise ExceptionForMatrix::ErrDimensionMismatch 次元が合わない場合に発生します
@raise ExceptionForMatrix::ErrNotRegular m が正則でない場合に発生します...

Matrix#+(m) -> Matrix (51328.0)

self に行列 m を加算した行列を返します。 self の column_size が 1 なら Vector オブジェクトも指定出来ます。

...した行列を返します。
self の column_size が 1 なら Vector オブジェクトも指定出来ます。

@param m 加算する行列。加算可能な行列やベクトルを指定します。

@raise ExceptionForMatrix::ErrDimensionMismatch 次元が合わない場合に発生します...

Matrix#-(m) -> Matrix (51328.0)

self から行列mを減算した行列を返します。 self の column_size が 1 なら Vector オブジェクトも指定出来ます。

...した行列を返します。
self の column_size が 1 なら Vector オブジェクトも指定出来ます。

@param m 減算する行列。減算可能な行列やベクトルを指定します。

@raise ExceptionForMatrix::ErrDimensionMismatch 次元が合わない場合に発生します...

Matrix#*(other) -> Matrix (51316.0)

self の各成分に数 other を掛けた行列を返します。

self の各成分に数 other を掛けた行列を返します。

@param other self の各成分に掛ける Numeric オブジェクトを指定します。

絞り込み条件を変える

Matrix#/(other) -> Matrix (51316.0)

self の各成分を数 other で割った行列を返します。

self の各成分を数 other で割った行列を返します。

@param other self の各成分を割る Numeric オブジェクトを指定します。

Matrix.combine(*matrices) -> Enumerator (51184.0)

要素ごとにブロックを呼び出した結果を組み合わせた Matrix を返します。

...ごとにブロックを呼び出した結果を組み合わせた Matrix を返します。

//emlist[例][ruby]{
require 'matrix'
x = Matrix[[6, 6], [4, 4]]
y = Matrix[[1, 2], [3, 4]]
Matrix
.combine(x, y) {|a, b| a - b} # => Matrix[[5, 4], [1, 0]]
//}

@param matrices 並べる行列。すべて...
...の行列の行数と列数が一致していなければならない
@raise ExceptionForMatrix::ErrDimensionMismatch 行や列の要素数が一致しない時に発生します
@see Matrix#combine...

Matrix#antisymmetric? -> bool (51133.0)

行列が反対称行列 (交代行列、歪〔わい〕対称行列とも) ならば true を返します。

...@raise ExceptionForMatrix::ErrDimensionMismatch 行列が正方行列でない場合に発生します

//emlist[][ruby]{
require 'matrix'

Matrix
[[0, -2, Complex(1, 3)], [2, 0, 5], [-Complex(1, 3), -5, 0]].antisymmetric? # => true
Matrix
.empty.antisymmetric? # => true

Matrix
[[1, 2, 3], [4, 5, 6]...
..., [7, 8, 9]].antisymmetric? # => false
# 対角要素が違う
Matrix
[[1, -2, 3], [2, 0, 6], [-3, -6, 0]].antisymmetric? # => false
# 符号が違う
Matrix
[[0, 2, -3], [2, 0, 6], [-3, 6, 0]].antisymmetric? # => false
//}...

Matrix#regular? -> bool (51133.0)

行列が正方で正則なら true を、特異なら false を返します。

...例外 ExceptionForMatrix::ErrDimensionMismatch を
発生させます。


//emlist[例][ruby]{
require 'matrix'

a1 = [ 1, 2, 3]
a2 = [10, 15, 20]
a3 = [-1, -2, 1.5]
m = Matrix[a1, a2, a3]
p m.regular? # => true

a1 = [ 1, 2, 3]
a2 = [10, 15, 20]
a3 = [-1, -2, -3]
m = Matrix[a1, a2, a3]
p m.re...
...gular? # => false

a1 = [ 1, 2, 3]
a2 = [10, 15, 20]
a3 = [-1, -2, 1.5]
a4 = [1, 1, 1]
m = Matrix[a1, a2, a3, a4]
p m.regular? # => raise ExceptionForMatrix::ErrDimensionMismatch
//}

@raise ExceptionForMatrix::ErrDimensionMismatch 行列が正方行列でない場合に発生します...

Matrix#skew_symmetric? -> bool (51133.0)

行列が反対称行列 (交代行列、歪〔わい〕対称行列とも) ならば true を返します。

...@raise ExceptionForMatrix::ErrDimensionMismatch 行列が正方行列でない場合に発生します

//emlist[][ruby]{
require 'matrix'

Matrix
[[0, -2, Complex(1, 3)], [2, 0, 5], [-Complex(1, 3), -5, 0]].antisymmetric? # => true
Matrix
.empty.antisymmetric? # => true

Matrix
[[1, 2, 3], [4, 5, 6]...
..., [7, 8, 9]].antisymmetric? # => false
# 対角要素が違う
Matrix
[[1, -2, 3], [2, 0, 6], [-3, -6, 0]].antisymmetric? # => false
# 符号が違う
Matrix
[[0, 2, -3], [2, 0, 6], [-3, 6, 0]].antisymmetric? # => false
//}...

絞り込み条件を変える

Matrix#cofactor_expansion(row: nil, column: nil) -> object | Integer | Rational | Float (51115.0)

row 行、もしくは column 列に関するラプラス展開をする。

...けです。かわりにMatrix#determinant を
利用すべきです。

変則的な形状の行列に対してはそれ以上の意味を持ちます。例えば
row行/column列が行列やベクトルである場合には

//emlist[例][ruby]{
require 'matrix'
# Matrix[[7,6], [3,9]].laplace_expa...
...=> 45
Matrix
[[Vector[1, 0], Vector[0, 1]], [2, 3]].laplace_expansion(row: 0) # => Vector[3, -2]
//}

@param row 行
@param column 列
@raise ArgumentError row と column を両方指定した、もしくは両方とも指定していない、場合に発生します
@raise ExceptionForMatrix::ErrD...
...imensionMismatch 行列が正方でない場合に発生します
@see Matrix#cofactor...

Matrix#laplace_expansion(row: nil, column: nil) -> object | Integer | Rational | Float (51115.0)

row 行、もしくは column 列に関するラプラス展開をする。

...けです。かわりにMatrix#determinant を
利用すべきです。

変則的な形状の行列に対してはそれ以上の意味を持ちます。例えば
row行/column列が行列やベクトルである場合には

//emlist[例][ruby]{
require 'matrix'
# Matrix[[7,6], [3,9]].laplace_expa...
...=> 45
Matrix
[[Vector[1, 0], Vector[0, 1]], [2, 3]].laplace_expansion(row: 0) # => Vector[3, -2]
//}

@param row 行
@param column 列
@raise ArgumentError row と column を両方指定した、もしくは両方とも指定していない、場合に発生します
@raise ExceptionForMatrix::ErrD...
...imensionMismatch 行列が正方でない場合に発生します
@see Matrix#cofactor...

Matrix#det -> Numeric (51079.0)

行列式 (determinant) の値を返します。

...オブジェクトを使用することを検討してください。

@raise ExceptionForMatrix::ErrDimensionMismatch 正方行列でない場合に発生します

//emlist[例][ruby]{
require 'matrix'

p Matrix[[2, 1], [-1, 2]].det #=> 5
p Matrix[[2.0, 1.0], [-1.0, 2.0]].det #=> 5.0
//}...

Matrix#determinant -> Numeric (51079.0)

行列式 (determinant) の値を返します。

...オブジェクトを使用することを検討してください。

@raise ExceptionForMatrix::ErrDimensionMismatch 正方行列でない場合に発生します

//emlist[例][ruby]{
require 'matrix'

p Matrix[[2, 1], [-1, 2]].det #=> 5
p Matrix[[2.0, 1.0], [-1.0, 2.0]].det #=> 5.0
//}...

Matrix#tr -> Integer | Float | Rational | Complex (51061.0)

トレース (trace) を返します。

...列のトレース (trace) とは、対角要素の和です。

//emlist[例][ruby]{
require 'matrix'
Matrix
[[7,6], [3,9]].trace # => 16
//}

trace は正方行列でのみ定義されます。

@raise ExceptionForMatrix::ErrDimensionMismatch 行列が正方行列でない場合に発生します...

絞り込み条件を変える

Matrix#trace -> Integer | Float | Rational | Complex (51061.0)

トレース (trace) を返します。

...列のトレース (trace) とは、対角要素の和です。

//emlist[例][ruby]{
require 'matrix'
Matrix
[[7,6], [3,9]].trace # => 16
//}

trace は正方行列でのみ定義されます。

@raise ExceptionForMatrix::ErrDimensionMismatch 行列が正方行列でない場合に発生します...

Matrix#cofactor(row, column) -> Integer | Rational | Float (51043.0)

(row, column)-余因子を返します。

...(row, column)-余因子を返します。

各要素の型によって返り値が変わります。

@param row 行
@param column 列
@raise ExceptionForMatrix::ErrDimensionMismatch 行列が正方でない場合に発生します。
@see Matrix#adjugate...

Matrix#singular? -> bool (51043.0)

行列が正方で特異なら true を、正則なら false を返します。

...るとは、正則でないことです。
行列式が0であること同値です。

正方行列でない場合には例外 ExceptionForMatrix::ErrDimensionMismatch を
発生させます。

@raise ExceptionForMatrix::ErrDimensionMismatch 行列が正方行列でない場合に発生します...

Matrix#diagonal? -> bool (51025.0)

行列が対角行列ならば true を返します。

...行列が対角行列ならば true を返します。

@raise ExceptionForMatrix::ErrDimensionMismatch 行列が正方行列でない場合に発生します...

Matrix#hermitian? -> bool (51025.0)

行列がエルミートならば true を返します。

...行列がエルミートならば true を返します。

@raise ExceptionForMatrix::ErrDimensionMismatch 行列が正方行列でない場合に発生します...

絞り込み条件を変える

Matrix#normal? -> bool (51025.0)

行列が正規行列ならば true を返します。

...行列が正規行列ならば true を返します。

@raise ExceptionForMatrix::ErrDimensionMismatch 行列が正方行列でない場合に発生します...

Matrix#orthogonal? -> bool (51025.0)

行列が直交行列ならば true を返します。

...行列が直交行列ならば true を返します。

@raise ExceptionForMatrix::ErrDimensionMismatch 行列が正方行列でない場合に発生します...

Matrix#permutation? -> bool (51025.0)

行列が置換行列ならば true を返します。

...行列が置換行列ならば true を返します。

@raise ExceptionForMatrix::ErrDimensionMismatch 行列が正方行列でない場合に発生します...

Matrix#symmetric? -> bool (51025.0)

行列が対称ならば true を返します。

...行列が対称ならば true を返します。

@raise ExceptionForMatrix::ErrDimensionMismatch 行列が正方行列でない場合に発生します...

Matrix#unitary? -> bool (51025.0)

行列がユニタリならば true を返します。

...行列がユニタリならば true を返します。

@raise ExceptionForMatrix::ErrDimensionMismatch 行列が正方行列でない場合に発生します...

絞り込み条件を変える

Vector#*(m) -> Matrix (24481.0)

自分自身を列ベクトル(行列)に変換して (実際には Matrix.column_vector(self) を適用) から、行列 m を右から乗じた行列 (Matrix クラス) を返します。

...を列ベクトル(行列)に変換して (実際には Matrix.column_vector(self) を適用) から、行列 m を右から乗じた行列 (Matrix クラス) を返します。

@param m 右から乗算を行う行列
@raise ExceptionForMatrix::ErrDimensionMismatch 次元が合わない場合に発...
...生します

=== 注意

引数の行列 m は自分自身を列ベクトルとした場合に乗算が定義できる行列である必要があります。

//emlist[例][ruby]{
require 'matrix'

v = Vector[1, 2]
a = [4, 5, 6]
m = Matrix[a]

p v * m # => Matrix[[4, 5, 6], [8, 10, 12]]
//}...

Vector#+(v) -> Vector | Matrix (24364.0)

self にベクトル v を加えたベクトルを返します。

...には column_size が 1 の Matrix オブジェクトも指定できます。
その場合は返り値も Matrix オブジェクトになります。

@param v 加算するベクトル。加算可能な行列やベクトルを指定します。

@raise ExceptionForMatrix::ErrDimensionMismatch 自...

Vector#-(v) -> Vector | Matrix (24364.0)

self からベクトル v を減じたベクトルを返します。

...には column_size が 1 の Matrix オブジェクトも指定できます。
その場合は返り値も Matrix オブジェクトになります。

@param v 減算するベクトル。減算可能な行列やベクトルを指定します。

@raise ExceptionForMatrix::ErrDimensionMismatch 自...

Vector#[]=(range, v) (24118.0)

Range オブジェクト range の範囲にある要素を v の内容に置換します。

...を Range オブジェクトで指定します。
@param v range の範囲に設定したい要素を指定します。
Vector や 1行の Matrix での指定もできます。
@raise TypeError ベクトルの範囲外にある range を指定したときに、発生します。
@raise Argu...
...@raise Matrix::ErrDimensionMismatch v に Matrix を指定し、次元が合わないときに発生します。

//emlist[][ruby]{
require 'matrix'

v = Vector[0, 0, 0, 0, 0]

v[1..2] = 5
p v #=> Vector[0, 5, 5, 0, 0]

v[1..3] = Vector[2, 4, 8]
p v #=> Vector[0, 2, 4, 8, 0]

v[1..-2] = Matrix[[3, 6...

Vector#*(other) -> Vector (24046.0)

self の各要素に数 other を乗じたベクトルを返します。

...ルを返します。

@param other self の各要素に掛ける Numeric オブジェクトを指定します。

//emlist[例][ruby]{
require 'matrix'
a = [1, 2, 3.5, 100]
v1 = Vector.elements(a)
p v1.*(2) # => Vector[2, 4, 7.0, 200]
p v1.*(-1.5) # => Vector[-1.5, -3.0, -5.25, -150.0]
//}...

絞り込み条件を変える

Vector#[]=(index, value) (24043.0)

index 番目の要素を value に変更します。

...定します。
@raise TypeError ベクトルの範囲外にある整数を指定したときに、発生します。

//emlist[][ruby]{
require 'matrix'

v = Vector[0, 0, 0, 0, 0]

v[1] = 2
p v #=> Vector[0, 2, 0, 0, 0]

v[-1] = 3
p v #=> Vector[0, 2, 0, 0, 3]

v[99] = 100
# IndexError: given index...

Vector#angle_with(v) -> Float (24043.0)

v と self がなす角度を返します。

...require 'matrix'
Vector[1, 0].angle_with(Vector[0, 1]) # => Math::PI/2
//}

@param v このベクトルと self とがなす角度を計算します
@raise ZeroVectorError self もしくは v のどちらかが零ベクトルである場合に
発生します
@raise ExceptionForMatrix::ErrDim...

Vector#collect2(v) -> Enumerator (24043.0)

ベクトルの各要素と引数 v の要素との組に対してブロックを評価し、その結果を要素として持つ配列を返します。

...クを省略した場合は Enumerator を返します。

@param v ブロック内で評価される(ベクトル or 配列)

@raise ExceptionForMatrix::ErrDimensionMismatch 自分自身と引数のベクト
ルの要素の数(次元)が異なっていたときに発生します。

@see Vec...

Vector#collect2(v) {|x, y| ... } -> Array (24043.0)

ベクトルの各要素と引数 v の要素との組に対してブロックを評価し、その結果を要素として持つ配列を返します。

...クを省略した場合は Enumerator を返します。

@param v ブロック内で評価される(ベクトル or 配列)

@raise ExceptionForMatrix::ErrDimensionMismatch 自分自身と引数のベクト
ルの要素の数(次元)が異なっていたときに発生します。

@see Vec...

Vector#map2(v) {|x, y| ... } -> Vector (24043.0)

ベクトルの各要素と引数 v の要素との組に対してブロックを評価し、その結果を要素として持つベクトルを返します。

...クを省略した場合は Enumerator を返します。

@param v ブロック内で評価される(ベクトル or 配列)

@raise ExceptionForMatrix::ErrDimensionMismatch 自分自身と引数のベクト
ルの要素の数(次元)が異なっていたときに発生します。

@see Vec...
...t2

次の例は、2つのベクトルの要素毎の積を要素として持つベクトルを生成します。

//emlist[例][ruby]{
require 'matrix'

v1 = Vector[2, 3, 5]
v2 = Vector[7, 9, 11]
a = Array[7, 9, 11]

z = v1.map2(v2) { |x, y| x * y }
p z # => Vector[14, 27, 55]

z = v1.map2(a) { |...

絞り込み条件を変える

Vector#dot(v) -> Float (24025.0)

ベクトル v との内積を返します。

...ベクトル v との内積を返します。

@param v 内積を求めるベクトル

@raise ExceptionForMatrix::ErrDimensionMismatch 自分自身と引数のベクト
ルの要素の数(次元)が異なっていたときに発生します。...

Vector#each2(v) -> Enumerator (24025.0)

ベクトルの各要素と、それに対応するインデックスを持つ引数 v の要素との組に対して (2引数の) ブロックを繰返し評価します。

...ロックを省略した場合は Enumerator を返します。

@param v 各要素と組を取るためのオブジェクト
@raise ExceptionForMatrix::ErrDimensionMismatch 自分自身と引数のベクト
ルの要素の数(次元)が異なっていたときに発生します。
@see Array...

Vector#each2(v) {|x, y| ... } -> self (24025.0)

ベクトルの各要素と、それに対応するインデックスを持つ引数 v の要素との組に対して (2引数の) ブロックを繰返し評価します。

...ロックを省略した場合は Enumerator を返します。

@param v 各要素と組を取るためのオブジェクト
@raise ExceptionForMatrix::ErrDimensionMismatch 自分自身と引数のベクト
ルの要素の数(次元)が異なっていたときに発生します。
@see Array...

Vector#inner_product(v) -> Float (24025.0)

ベクトル v との内積を返します。

...ベクトル v との内積を返します。

@param v 内積を求めるベクトル

@raise ExceptionForMatrix::ErrDimensionMismatch 自分自身と引数のベクト
ルの要素の数(次元)が異なっていたときに発生します。...