るりまサーチ

最速Rubyリファレンスマニュアル検索!
54件ヒット [1-54件を表示] (0.037秒)
トップページ > クエリ:require[x] > クエリ:columns[x]

別のキーワード

  1. kernel require
  2. getoptlong require_order
  3. rubygems/custom_require require
  4. irb/ext/use-loader irb_require
  5. require execute

ライブラリ

クラス

モジュール

キーワード

検索結果

Matrix.columns(columns) -> Matrix (18236.0)

引数 columns を列ベクトルの集合とする行列を生成します。

... columns を列ベクトルの集合とする行列を生成します。

@param columns 配列の配列を渡します。

=== 注意

Matrix.rows との違いは引数として渡す配列の配列を列ベクトルの配列とみなして行列を生成します。

//emlist[例][ruby]{
require
'...
...3]
# [ 4, 5, 6]
# [-1, -2, -3]

# 配列を列ベクトルとして生成
m = Matrix.columns([a1, a2, a3])
p m # => Matrix[[1, 4, -1], [2, 5, -2], [3, 6, -3]]
# 行列としてのイメージ => [1, 4, -1]
#...

CSV::Row#deconstruct -> [object] (18.0)

パターンマッチに使用する行の値の配列を返します。

...t[例][ruby]{
require
"csv"
row = CSV::Row.new(["header1", "header2", "header3"], [1, 2, 3])
case row
in [2.., 2.., 2..]
puts "all 2 or more"
in [...2, 2.., 2..]
puts "first column is less than 2, and rest columns are 2 or more"
end
#=> "first column is less than 2, and rest columns are 2 or mor...

CSV::Row#deconstruct_keys(keys) -> Hash (18.0)

パターンマッチに使用するヘッダの名前と値の Hash を返します。

...//emlist[例][ruby]{
require
"csv"

row = CSV::Row.new([:header1, :header2, :header3], [1, 2, 3])
case row
in { header1: 2.., header2: 2.., header3: 2.. }
puts "all 2 or more"
in { header1: ...2, header2: 2.., header3: 2.. }
puts "first column is less than 2, and rest columns are 2 or more"
end...
...#=> "first column is less than 2, and rest columns are 2 or more" が出力される
//}

@see d:spec/pattern_matching#matching_non_primitive_objects...

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

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

...column_size のいずれか一方は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 行...

Rake.application -> Rake::Application (12.0)

現在の Rake アプリケーションを返します。

...現在の Rake アプリケーションを返します。

//emlist[][ruby]{
# Rakefile での記載例とする

require
'pp'

task default: :test_rake_app
task :test_rake_app do
pp Rake.application
end

# => #<Rake::Application:0x31b0f18
# @default_loader=#<Rake::DefaultLoader:0x31b0c78>,
#...
...ile", "rakefile.rb", "Rakefile.rb"],
# @rules=[],
# @scope=LL(),
# @tasks=
# {"default"=><Rake::Task default => [test_rake_app]>,
# "test_rake_app"=><Rake::Task test_rake_app => []>},
# @terminal_columns=0,
# @top_level_tasks=["default"],
# @tty_output=false>
//}...

絞り込み条件を変える

Rake.application=(app) (12.0)

現在の Rake アプリケーションをセットします。

...ットします。

@param app Rake::Application のインスタンスを指定します。

//emlist[][ruby]{
# Rakefile での記載例とする

require
'pp'

task default: :test_rake_app
task :test_rake_app do
app = Rake::Application.new
app.tty_output = true
Rake.application = app
pp Ra...
...alse>,
# @original_dir="/path/to/dir",
# @pending_imports=[],
# @rakefile=nil,
# @rakefiles=["rakefile", "Rakefile", "rakefile.rb", "Rakefile.rb"],
# @rules=[],
# @scope=LL(),
# @tasks={},
# @terminal_columns=0,
# @top_level_tasks=[],
# @tty_output=true>
//}...