Class: MPFI::RowVector

Inherits:
Matrix
  • Object
show all
Includes:
Vector
Defined in:
lib/mpfi/matrix.rb,
ext/mpfi_matrix/mpfi/ruby_mpfi_matrix.c

Class Method Summary collapse

Methods included from Vector

#[], #[]=, #abs, #dim, distance, #distance_center_pts, #distance_from, #each_element, #each_element_with_index, #each_subdivision, #each_subdivision_by_size, inner_product, #inner_product, #inspect, #midpoint, #normalize, #normalize!, #pretty_print, #set_length, #set_length!, #subdivision, #subdivision_by_size, #to_s

Methods inherited from Matrix

#*, #+, #-, #==, #add, #at, #bounded?, #column, #column_size, create, #div_scalar, #each_element, #each_element_with_index, #each_subdivision, #each_subdivision_by_size, #element, #include?, #inspect, #intersect, #marshal_dump, #marshal_load, #max_diam_abs, #mid, #mid_interval, #mul, #mul_scalar, #neg, #pretty_print, #row, #row_size, #set_element, #size, #str_ary_for_inspect, #str_ary_for_inspect2, #strictly_include?, #sub, #subdivision, #subdivision_by_size, suitable_matrix_from_ary, #to_a, #to_a2, #to_s, #to_str_ary, #to_strf_ary, #transpose, #transpose!, #union

Class Method Details

.interval(ary) ⇒ Object



268
269
270
271
272
273
274
# File 'lib/mpfi/matrix.rb', line 268

def self.interval(ary)
  if Array === ary && ary.all?{ |a| Array === a }
    self.new(ary.map { |a| MPFI.interval(*a) })
  else
    nil
  end
end