Class: NetCDF::Dimension
Overview
A Dimension is used to define the array shape of a Variable. It may be shared among Variables, which provides a simple yet powerful way of associating Variables. When a Dimension is shared, it has a unique name within its Group. It may have a coordinate Variable, which gives each index a coordinate value. A private Dimension cannot have a coordinate Variable, so use shared dimensions with coordinates when possible. The Dimension length must be > 0, except for an unlimited dimension which may have length = 0, and a vlen Dimension has length = -1. Immutable if setImmutable() was called, except for an Unlimited Dimension, whose size can change.
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from CDMNode
Instance Method Summary collapse
-
#get_length ⇒ Object
(also: #length)
————————————————————————————.
-
#group ⇒ Object
————————————————————————————.
-
#shared? ⇒ Boolean
————————————————————————————.
-
#unlimited? ⇒ Boolean
————————————————————————————.
-
#variable_length? ⇒ Boolean
————————————————————————————.
Methods inherited from CDMNode
#get_full_name, #get_short_name, #initialize
Constructor Details
This class inherits a constructor from NetCDF::CDMNode
Instance Method Details
#get_length ⇒ Object Also known as: length
42 43 44 |
# File 'lib/netcdf/dimension.rb', line 42 def get_length @netcdf_elmt.getLength() end |
#group ⇒ Object
76 77 78 |
# File 'lib/netcdf/dimension.rb', line 76 def group NetCDF::Group.new(@netcdf_elmt.getGroup()) end |
#shared? ⇒ Boolean
52 53 54 |
# File 'lib/netcdf/dimension.rb', line 52 def shared? @netcdf_elmt.isShared() end |
#unlimited? ⇒ Boolean
60 61 62 |
# File 'lib/netcdf/dimension.rb', line 60 def unlimited? @netcdf_elmt.isUnlimited() end |
#variable_length? ⇒ Boolean
68 69 70 |
# File 'lib/netcdf/dimension.rb', line 68 def variable_length? @netcdf_elmt.isVariableLength() end |