Class: NumRu::VArrayNuSDaS

Inherits:
VArray
  • Object
show all
Defined in:
lib/numru/gphys/varraynusdas.rb

Constant Summary

Constants inherited from VArray

NumRu::VArray::Binary_operators, NumRu::VArray::Binary_operatorsL, NumRu::VArray::Binary_operatorsL_comp, NumRu::VArray::Binary_operatorsL_other, NumRu::VArray::Binary_operators_Uconv, NumRu::VArray::Binary_operators_Unone, NumRu::VArray::Binary_operators_Uop, NumRu::VArray::Math_funcs, NumRu::VArray::Math_funcs_nondim, NumRu::VArray::Math_funcs_radian, NumRu::VArray::NArray_type1_methods, NumRu::VArray::NArray_type2_methods, NumRu::VArray::NArray_type2_methods1, NumRu::VArray::NArray_type2_methods2, NumRu::VArray::NArray_type2_methods3, NumRu::VArray::NArray_type3_methods, NumRu::VArray::Unary_operators

Instance Method Summary collapse

Methods inherited from VArray

#+@, #[], #[]=, #att_names, #attr_copy, #axis_cyclic?, #axis_cyclic_extendible?, #axis_draw_positive, #axis_modulo, #bin_mean, #bin_sum, #coerce, #convert_units, #copy, #del_att, #get_att, #long_name, #long_name=, #mapped?, #marshal_dump, #marshal_load, #name, #name=, new2, #ntype, #rename, #rename!, #replace_val, #reshape, #reshape!, #set_att, #sqrt, #to_g1D, #transpose, #units, #units=, #val=

Constructor Details

#initialize(var) ⇒ VArrayNuSDaS

Returns a new instance of VArrayNuSDaS.



11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/numru/gphys/varraynusdas.rb', line 11

def initialize(var)
  unless NuSDaSVar === var
    raise ArgumentError, "Not a NuSDaSVar"
  end
  @name = var.name
  @mapping = nil
  @varray = nil
  @ary = var
  @attr = Attribute.new
  var.att_names.each{|name|
    @attr[name] = var.att(name)
  }
end

Instance Method Details

#dim_namesObject



50
51
52
# File 'lib/numru/gphys/varraynusdas.rb', line 50

def dim_names
  @ary.dim_names
end

#fileObject



54
55
56
# File 'lib/numru/gphys/varraynusdas.rb', line 54

def file
  @ary.nusdas
end

#inspectObject



25
26
27
# File 'lib/numru/gphys/varraynusdas.rb', line 25

def inspect
  "<'#{name}' in '#{@ary.nusdas.root}' [#{@ary.shape.join(", ")}]>"
end

#rankObject



44
45
46
# File 'lib/numru/gphys/varraynusdas.rb', line 44

def rank
  @ary.rank
end

#shapeObject Also known as: shape_ul0, shape_current



33
34
35
# File 'lib/numru/gphys/varraynusdas.rb', line 33

def shape
  @ary.shape
end

#totalObject Also known as: length



39
40
41
# File 'lib/numru/gphys/varraynusdas.rb', line 39

def total
  @ary.total
end

#valObject



29
30
31
# File 'lib/numru/gphys/varraynusdas.rb', line 29

def val
  @ary.get
end