The base units this term is derived from
 @return [Array] An array of Unitwise::Term
 @api public
511922
def root_terms
      if terminal?
        [self]
      else
        atom.scale.root_terms.map do |t|
          self.class.new(:atom => t.atom, :exponent => t.exponent * exponent)
        end
      end
    end
1057600
def inch
      line  =  Builders::Signature[self]
      line  =  line.gsub("__dry_initializer_options__", "options")
      lines =  ["@!method initialize(#{line})"]
      lines += ["Initializes an instance of #{extended_class}"]
      lines += definitions.values.map(&:inch)
      lines += ["@return [#{extended_class}]"]
      lines.join("\n")
    end
1116696
def to_model
      HQMF::Value.new(type, unit, value, inclusive?, derived?, expression)
    end
1321782
def get_unit_by_index(self, unit_index) -> typing.Optional['BaseUnit']:
        
        if unit_index in self._section_group['units'].keys():
            if unit_index not in self.__units.keys():
                _category = self.units_class_enum[self.group_category]  # type: ignore
                self.__units[unit_index] = _category(self.d, self.l10n, self.coa_color,
                                                     self.country_index,
                                                     self.group_category,
                                                     self.group_index, unit_index)
            return self.__units[unit_index]
        return None
1295095
def as_base_units(self):
        
        b = collections.defaultdict(int)
        factor = 1
        for k, v in self.items():
            derived = False
            for d in DERIVED_UNITS.values():
                if k in d:
                    for k2, v2 in d[k].items():
                        if isinstance(k2, Number):
                            factor *= k2 ** (v2 * v)
                        else:
                            b[k2] += v2 * v
                    derived = True
                    break
            if not derived:
                si, f = _get_si_unit(k)
                b[si] += v
                factor *= f ** v
        return {k: v for k, v in b.items() if v != 0}, factor
652379
def units(self, value):
        
        for m in self.geometry.values():
            m.units = value
6688
def unit_str
      rv = @numerator_units.sort.join("*")
      if @denominator_units.any?
        rv << "/"
        rv << @denominator_units.sort.join("*")
      end
      rv
    end
353141
def convert_to_equivalent_unit!(new_unit)
      old_unit = @unit
      self.multiply!(Unit.ratio new_unit, old_unit)
      old_base_units = old_unit.base_units.map { |base| base.unit } if old_unit.is_compound_unit?
      self.cancel_base_units!(*old_base_units || [old_unit])
    end
1183985
def scale=(attrs)
      @scale = if attrs[:function_code]
        Functional.new(attrs[:value], attrs[:unit_code], attrs[:function_code])
      else
        Scale.new(attrs[:value], attrs[:unit_code])
      end
    end
966679
def units(self) -> typing.Iterator['BaseUnit']:
        
        for group in self.groups:
            for unit in group.units:

                yield unit
1367509
def get_unit(key)
    @counters[key] ||= 0
    @counters[key] += @interval
    @counters[key] = @counters[key] - 1.0 if @counters[key] > 1
    @counters[key] = @counters[key] + 1.0 if @counters[key] < 0
    @counters[key]
  end
921757
def coerce(other)
      return [other.to_unit, self] if other.respond_to? :to_unit
      case other
      when Unit
        [other, self]
      else
        [RubyUnits::Unit.new(other), self]
      end
    end
40226
def units(cls, scale=1):
        '''
        

        '''
        return [cls(x=scale), cls(y=scale), cls(z=scale)]
1107080
def to_base
      return self if base?
      if @@unit_map[units] =~ /\A<(?:temp|deg)[CRF]>\Z/
        @signature = @@kinds.key(:temperature)
        base = if temperature?
                 convert_to('tempK')
               elsif degree?
                 convert_to('degK')
               end
        return base
      end

      cached = (begin
                  (@@base_unit_cache[units] * scalar)
                rescue
                  nil
                end)
      return cached if cached

      num = []
      den = []
      q   = Rational(1)
      @numerator.compact.each do |num_unit|
        if @@prefix_values[num_unit]
          q *= @@prefix_values[num_unit]
        else
          q *= @@unit_values[num_unit][:scalar] if @@unit_values[num_unit]
          num << @@unit_values[num_unit][:numerator] if @@unit_values[num_unit] && @@unit_values[num_unit][:numerator]
          den << @@unit_values[num_unit][:denominator] if @@unit_values[num_unit] && @@unit_values[num_unit][:denominator]
        end
      end
      @denominator.compact.each do |num_unit|
        if @@prefix_values[num_unit]
          q /= @@prefix_values[num_unit]
        else
          q /= @@unit_values[num_unit][:scalar] if @@unit_values[num_unit]
          den << @@unit_values[num_unit][:numerator] if @@unit_values[num_unit] && @@unit_values[num_unit][:numerator]
          num << @@unit_values[num_unit][:denominator] if @@unit_values[num_unit] && @@unit_values[num_unit][:denominator]
        end
      end

      num = num.flatten.compact
      den = den.flatten.compact
      num = UNITY_ARRAY if num.empty?
      base = RubyUnits::Unit.new(RubyUnits::Unit.eliminate_terms(q, num, den))
      @@base_unit_cache[units] = base
      base * @scalar
    end
1354738
def want(unit=nil)
      case unit
      when Unit
        expr = unit.expr
      when Quantity
        expr = unit.expr
        unit = unit.unit
      when String,Symbol
        expr = unit
        unit = Unit.parse(expr)
      when Numeric
        unit = Unit.cast(unit)
      when NilClass
        unit = Unit.cast(1)
      else
        raise TypeError, "invalid argument: #{unit.inspect}"
      end
      val = unit.convert(self)
      self.class.new( val, expr, unit )
    end
863887
def create_unit(type, attributes: {})
      "#{self.class.name.split('::').first}::#{type.to_s.camelize}".constantize
        .new(options: unit_options, logger: logger).tap do |unit|
        {src: :source, dst: :destination}.each do |k, v|
          unit.send "#{v}=".to_sym, attributes[k] unless attributes[k].nil?
        end

        UNIT_ATTRIBUTES[type].each do |v|
          unit.send "#{v}=".to_sym, defaults[v] unless defaults[v].nil?
          unit.send "#{v}=".to_sym, attributes[v] unless attributes[v].nil?
        end
      end
    end
1359540
def column
      cast_type = ActiveRecord::Base.connection.lookup_cast_type(definition)
      @column ||= self.class.column_factory.new(
        name,
        default_value,
        cast_type,
        definition,
        null_value
      )
    end