るりまサーチ

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

別のキーワード

  1. object yield_self
  2. _builtin yield_self
  3. _builtin self
  4. tracepoint self
  5. codeobject document_self=

モジュール

オブジェクト

キーワード

検索結果

<< 1 2 3 ... > >>

String#*(times) -> String (18124.0)

文字列の内容を times 回だけ繰り返した新しい文字列を作成して返します。

...ram times 整数
@return self を times 回繰り返した新しい文字列

@raise ArgumentError 引数に負数を指定したときに発生します。

//emlist[例][ruby]{
p "str" * 3 # => "strstrstr"

str = "abc"
p str * 4 # => "abcabcabcabc"
p str * 0 # => ""
p str #...

Vector#*(m) -> Matrix (18124.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#*(other) -> Vector (18124.0)

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

...
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.*(-...

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

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

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

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

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

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

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

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

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

@raise ExceptionForMatrix::Err...

絞り込み条件を変える

Benchmark::Tms#*(x) -> Benchmark::Tms (18116.0)

self と x の乗算を計算します。

...
self
と x の乗算を計算します。

@param x Benchmark::Tms のオブジェクトか Float に暗黙の変換ができるオブジェクトです。

@return 計算結果は新しい Benchmark::Tms オブジェクトです。

@see Benchmark::Tms#memberwise...

BigDecimal#*(other) -> BigDecimal (18106.0)

積を計算します。

...積を計算します。

@param other self に掛ける数を指定します。

計算結果の精度についてはlib:bigdecimal#precisionを参照してください。...

BigDecimal#**(n) -> BigDecimal (6128.0)

self の n 乗を計算します。

...
self
の n 乗を計算します。

戻り値の有効桁数は self の有効桁数の n 倍以上になります。

@param n selfを other 乗する数を指定します。

@param prec 有効桁数を整数で指定します。...
...
self
の n 乗を計算します。

戻り値の有効桁数は self の有効桁数の n 倍以上になります。

@param n selfを other 乗する数を指定します。

@param prec 有効桁数を整数で指定します。


@see Integer#pow...

Matrix#**(n) -> Matrix (6116.0)

self の n 乗を返します。

...
self
の n 乗を返します。

@param n べき数の指定
@raise ExceptionForMatrix::ErrNotRegular n が 0 以下で、行列が正則でない場合に発生します...

Integer#**(other) -> Numeric (6106.0)

算術演算子。冪(べき乗)を計算します。

...(self**other) % modulo と同じ結果を返します。
@return 計算結果
@raise TypeError 2引数 pow で Integer 以外を指定した場合に発生します。
@raise RangeError 2引数 pow で other に負の数を指定した場合に発生します。

//emlist[][ruby]{
2 ** 3 # => 8
2 **...
...0 # => 1
0 ** 0 # => 1
3.pow(3, 8) # => 3
3.pow(3, -8) # => -5
3.pow(2, -2) # => -1
-3.pow(3, 8) # => 5
-3.pow(3, -8) # => -3
5.pow(2, -8) # => -7
//}

結果が巨大すぎる整数になりそうなとき、警告を出したうえで Float::INFINITY を返します。

//emlist[計算を...
...放棄して Float::INFINITY を返す例][ruby]{
p 100**9999999
# => warning: in a**b, b may be too big
# Infinity
//}

判定の閾値は変わりえます。

@see BigDecimal#power...

絞り込み条件を変える

<< 1 2 3 ... > >>