るりまサーチ (Ruby 2.3.0)

最速Rubyリファレンスマニュアル検索!
17件ヒット [1-17件を表示] (0.017秒)

別のキーワード

  1. _builtin size
  2. net/imap size
  3. _builtin size?
  4. rexml/document size
  5. set size

クラス

キーワード

検索結果

Vector#size -> Integer (54310.0)

ベクトルの要素数(次元)を返します。

ベクトルの要素数(次元)を返します。

Matrix#column_size -> Integer (9310.0)

行列の列数を返します。

行列の列数を返します。

Matrix#row_size -> Integer (9310.0)

行列の行数を返します。

行列の行数を返します。

Matrix.build(row_size, column_size = row_size) -> Enumerable (1057.0)

row_size×column_sizeの行列をブロックの返り値から生成します。

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

//emlist[例][ruby]{
require 'matrix'
m = Matrix.build(2, 4) {|row, col| col - row }
# => Matrix[[0, 1, 2, 3], [-1, 0, 1, 2]]
m = Matrix.build(3) { rand }
# => a 3x3 matrix with random elements
//}

@param row_size 行列の行数
@param column_size...

Matrix.build(row_size, column_size = row_size) {|row, col| ... } -> Matrix (1057.0)

row_size×column_sizeの行列をブロックの返り値から生成します。

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

//emlist[例][ruby]{
require 'matrix'
m = Matrix.build(2, 4) {|row, col| col - row }
# => Matrix[[0, 1, 2, 3], [-1, 0, 1, 2]]
m = Matrix.build(3) { rand }
# => a 3x3 matrix with random elements
//}

@param row_size 行列の行数
@param column_size...

絞り込み条件を変える

Matrix.empty(row_size=0, column_size=0) -> Matrix (721.0)

要素を持たない行列を返します。

...一方は0である必要があります。

//emlist[例][ruby]{
require 'matrix'
m = Matrix.empty(2, 0)
m == Matrix[ [], [] ]
# => true
n = Matrix.empty(0, 3)
n == Matrix.columns([ [], [], [] ])
# => true
m * n
# => Matrix[[0, 0, 0], [0, 0, 0]]
//}

@param row_size 行列の行数
@param column_si...

Matrix#minor(from_row, row_size, from_col, col_size) -> Matrix (649.0)

selfの部分行列を返します。

...ram col_size 部分行列の列サイズ

//emlist[例][ruby]{
require 'matrix'
a1 = [ 1, 2, 3, 4, 5]
a2 = [11, 12, 13, 14, 15]
a3 = [21, 22, 23, 24, 25]
a4 = [31, 32, 33, 34, 35]
a5 = [51, 52, 53, 54, 55]
m = Matrix[a1, a2, a3, a4, a5]

p m.minor(0, 2, 1, 2) # => Matrix[[2, 3], [12, 13]]
//}...

Vector.basis(size:, index:) -> Vector (394.0)

size 次元ベクトル空間の index 番目の標準基底を返します。

...size 次元ベクトル空間の index 番目の標準基底を返します。

//emlist[例][ruby]{
require 'matrix'
Vector.basis(size: 3, index: 1) # => Vector[0, 1, 0]
//}

@param size ベクトルの次元
@param index 標準基底の何番目か。0 origin...

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

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

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

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

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

Matrix#-(m) -> Matrix (55.0)

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

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

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

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

絞り込み条件を変える

Matrix#minor(from_row..to_row, from_col..to_col) -> Matrix (49.0)

selfの部分行列を返します。

...ram col_size 部分行列の列サイズ

//emlist[例][ruby]{
require 'matrix'
a1 = [ 1, 2, 3, 4, 5]
a2 = [11, 12, 13, 14, 15]
a3 = [21, 22, 23, 24, 25]
a4 = [31, 32, 33, 34, 35]
a5 = [51, 52, 53, 54, 55]
m = Matrix[a1, a2, a3, a4, a5]

p m.minor(0, 2, 1, 2) # => Matrix[[2, 3], [12, 13]]
//}...

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

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

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

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

@raise ExceptionForMatrix::ErrDimensionMismatch 自...

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

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

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

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

@raise ExceptionForMatrix::ErrDimensionMismatch 自...

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

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

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

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

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

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

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

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

絞り込み条件を変える

Matrix#column_count -> Integer (10.0)

行列の列数を返します。

行列の列数を返します。

Matrix#row_count -> Integer (10.0)

行列の行数を返します。

行列の行数を返します。