rdoc/tensor.rdoc in gsl-1.15.3 vs rdoc/tensor.rdoc in gsl-1.16.0.6

- old
+ new

@@ -1,11 +1,11 @@ # # = Tensor manipulations -# The tensor library is developed by J. Burguet and distributed -# as an add-on package of GSL. See {here}[http://sources.redhat.com/ml/gsl-discuss/2004-q4/msg00053.html"target="_top] and {here}[http://sources.redhat.com/ml/gsl-discuss/2004-q4/msg00055.html"target="_top]. +# The tensor library is developed by J. Burguet and distributed +# as an add-on package of GSL. See {here}[https://sourceware.org/ml/gsl-discuss/2004-q4/msg00053.html] and {here}[https://sourceware.org/ml/gsl-discuss/2004-q4/msg00055.html]. # -# == {}[link:index.html"name="1] Class methods +# == Class methods # --- # * GSL::Tensor.new(rank, dimention) # * GSL::Tensor.alloc(rank, dimention) # * GSL::Tensor[rank, dimention] # @@ -14,11 +14,11 @@ # --- # * GSL::Tensor.calloc(rank, dimention) # # Creates a tensor of rank <tt>rank</tt> and dimension <tt>dimention</tt>, # and initializes all the elements to zero. -# +# # --- # * GSL::Tensor.copy(tensor) # # Create a tensor copying the existing tensor <tt>tensor</tt>. # @@ -31,29 +31,29 @@ # --- # * GSL::Tensor.swap(a, b) # # Exchanges the elements of the tensor <tt>a</tt> and <tt>b</tt>. # -# == {}[link:index.html"name="2] Instance methods -# === {}[link:index.html"name="2.1] Accessing tensor elements +# == Instance methods +# === Accessing tensor elements # --- # * GSL::Tensor#set_zero # # Sets all the element of the tensor <tt>self</tt> to zero. # --- # * GSL::Tensor#set_all(x) # # Sets all the element of the tensor <tt>self</tt> to <tt>x</tt>. # --- # * GSL::Tensor#set(indices, x) -# * GSL::Tensor#[indices]=x +# * \GSL::Tensor#[indices]=x # # Sets the element of the given indices to <tt>x</tt>. # # --- # * GSL::Tensor#get(indices) -# * GSL::Tensor#[indices] +# * \GSL::Tensor#[indices] # # Returns the tensor element. If the number of indices given is smaller than the # rank of the tensor, the method GSL::Tensor#subtensor is called. # # Ex: @@ -68,35 +68,35 @@ # >> t[0, 0, 2] # => 456.0 # # --- # * GSL::Tensor#subtensor(indices) -# * GSL::Tensor#[indices] +# * \GSL::Tensor#[indices] # # Return a subtensor. -# +# # Ex: # >> require("gsl") # => true # >> t = Vector[1..125].to_tensor(3, 5) -# => GSL::Tensor: +# => GSL::Tensor: # [ 1.000e+00 2.000e+00 3.000e+00 4.000e+00 5.000e+00 6.000e+00 7.000e+00 ... ] # >> t[0] -# => GSL::Tensor::View: -# [ 1.000e+00 2.000e+00 3.000e+00 4.000e+00 5.000e+00 -# 6.000e+00 7.000e+00 8.000e+00 9.000e+00 1.000e+01 -# 1.100e+01 1.200e+01 1.300e+01 1.400e+01 1.500e+01 -# 1.600e+01 1.700e+01 1.800e+01 1.900e+01 2.000e+01 +# => GSL::Tensor::View: +# [ 1.000e+00 2.000e+00 3.000e+00 4.000e+00 5.000e+00 +# 6.000e+00 7.000e+00 8.000e+00 9.000e+00 1.000e+01 +# 1.100e+01 1.200e+01 1.300e+01 1.400e+01 1.500e+01 +# 1.600e+01 1.700e+01 1.800e+01 1.900e+01 2.000e+01 # 2.100e+01 2.200e+01 2.300e+01 2.400e+01 2.500e+01 ] # >> t[0,2] -# => GSL::Tensor::View: +# => GSL::Tensor::View: # [ 1.100e+01 1.200e+01 1.300e+01 1.400e+01 1.500e+01 ] # >> t[3,1] -# => GSL::Tensor::View: +# => GSL::Tensor::View: # [ 8.100e+01 8.200e+01 8.300e+01 8.400e+01 8.500e+01 ] # >> t[1][2] -# => GSL::Tensor::View: +# => GSL::Tensor::View: # [ 3.600e+01 3.700e+01 3.800e+01 3.900e+01 4.000e+01 ] # # --- # * GSL::Tensor#swap_indices(i, j) # * GSL::Tensor#data @@ -113,12 +113,12 @@ # Converts the tensor of rank 1 into a <tt>GSL::Vector::View</tt> object. # --- # * GSL::Tensor#to_matrix # # Converts the tensor of rank 2 into a <tt>GSL::Matrix::View</tt> object. -# -# === {}[link:index.html"name="2.2] IO +# +# === IO # --- # * GSL::Tensor#fwrite(io) # * GSL::Tensor#fwrite(filename) # * GSL::Tensor#fread(io) # * GSL::Tensor#fread(filename) @@ -126,21 +126,21 @@ # * GSL::Tensor#fprintf(filename, format="%g") # * GSL::Tensor#fscanf(io) # * GSL::Tensor#fscanf(filename) # # -# === {}[link:index.html"name="2.3] Max, min +# === Max, min # --- # * GSL::Tensor#max # * GSL::Tensor#min # * GSL::Tensor#minmax # * GSL::Tensor#max_index # * GSL::Tensor#min_index # * GSL::Tensor#minmax_index # # -# === {}[link:index.html"name="2.4] Tensor operations +# === Tensor operations # --- # * GSL::Tensor#add(b) # * GSL::Tensor#+(b) # # Creates a new tensor adding two tensors <tt>self</tt> and <tt>b</tt>. @@ -158,21 +158,21 @@ # # Subtracts the element of tensor <tt>b</tt> from the elements of <tt>self</tt> , <tt>in-place</tt>. # --- # * GSL::Tensor#mul_elements(b) # -# This calculate element-by-element multiplication of <tt>self</tt> and <tt>b</tt>, +# This calculate element-by-element multiplication of <tt>self</tt> and <tt>b</tt>, # and returns a new tensor. # --- # * GSL::Tensor#mul_elements!(b) # # Multiplies the elements of tensor <tt>self</tt> to the elements of <tt>b</tt> , <tt>in-place</tt>. # --- # * GSL::Tensor#div_elements(b) # * GSL::Tensor#/(b) # -# This calculate element-by-element division of <tt>self</tt> and <tt>b</tt>, +# This calculate element-by-element division of <tt>self</tt> and <tt>b</tt>, # and returns a new tensor. # Multiplies the elements of tensor <tt>b</tt> to the elements of <tt>self</tt> , <tt>in-place</tt>. # --- # * GSL::Tensor#div_elements!(b) # @@ -214,14 +214,14 @@ # --- # * GSL::Tensor#equal?(b, eps = 1e-10) # * GSL::Tensor#==(b) # # Returns <tt>true</tt> if the tensors have same size and elements -# equal to absolute accurary <tt>eps</tt> for all the indices, +# equal to absolute accurary <tt>eps</tt> for all the indices, # and <tt>false</tt> otherwise. # -# === {}[link:index.html"name="2.5] Tensor properties +# === Tensor properties # --- # * GSL::Tensor#isnull # # Returns 1 if all the elements of the tensor are zero, and 0 otherwise. # --- @@ -240,12 +240,12 @@ # --- # * GSL::Tensor#size # # Returns the size # -# {prev}[link:files/rdoc/rngextra_rdoc.html] -# {next}[link:files/rdoc/narray_rdoc.html] +# {prev}[link:rdoc/rng_rdoc.html#label-Random+number+generator+initialization] +# {next}[link:rdoc/narray_rdoc.html] # -# {Reference index}[link:files/rdoc/ref_rdoc.html] -# {top}[link:files/rdoc/index_rdoc.html] +# {Reference index}[link:rdoc/ref_rdoc.html] +# {top}[link:index.html] # #