Method List
Search:
-
#% SY::Magnitude
-
#* SY::Quantity
-
* WILDCARD_ZERO=Object.new
-
#* SY::Unit
-
#* SY::Composition
-
#* SY::Magnitude
-
#* SY::Dimension
-
#* SY::Measure
-
#* Matrix
-
#** SY::Measure
-
#** SY::Quantity
-
#** SY::Magnitude
-
** WILDCARD_ZERO=Object.new
-
#** SY::Unit
-
+ WILDCARD_ZERO=Object.new
-
#+ SY::SignedMagnitude
-
#+ SY::Unit
-
#+ SY::Composition
-
#+ SY::Magnitude
-
#+ SY::CelsiusMagnitude
-
#+ SY::Dimension
-
#+ SY::AbsoluteMagnitude
-
#+@ SY::Composition
-
#+@ SY::Magnitude
-
#- SY::AbsoluteMagnitude
-
#- SY::Unit
-
#- SY::SignedMagnitude
-
#- SY::Dimension
-
- WILDCARD_ZERO=Object.new
-
#- SY::CelsiusMagnitude
-
#- SY::Magnitude
-
#- SY::Composition
-
#-@ SY::Magnitude
-
#-@ SY::Composition
-
#/ SY::Composition
-
#/ SY::Unit
-
/ WILDCARD_ZERO=Object.new
-
#/ Matrix
-
#/ SY::Measure
-
#/ SY::Quantity
-
#/ SY::Magnitude
-
#/ SY::Dimension
-
#<=> SY::Magnitude
-
#== SY::Dimension
-
Amount SY
-
Dimension SY
-
Magnitude SY
-
Quantity SY
-
Unit SY
-
#[] SY::Dimension
-
__new__ SY::Dimension
-
#abbreviation SY::Unit
-
abbreviations SY::Unit
-
#abs SY::Magnitude
-
#absolute SY::Magnitude
-
absolute SY::Magnitude
-
#absolute SY::Quantity
-
#absolute? SY::Quantity
-
#add SY::AbsoluteMagnitude
-
#amount SY::Magnitude
-
#atomic? SY::Composition
-
base SY::Dimension
-
#base? SY::Dimension
-
#call SY::Magnitude
-
#coerce SY::Magnitude
-
coerce WILDCARD_ZERO=Object.new
-
#coerce SY::Unit
-
#coerce SY::Quantity
-
#coerces SY::Quantity
-
#coerces? SY::Composition
-
#coerces? SY::Quantity
-
#colleague SY::Quantity
-
#composition SY::Quantity
-
difference SY::Magnitude
-
#dimension SY::Quantity
-
#dimension SY::Composition
-
dimensionless SY::Quantity
-
#dimensionless? SY::Quantity
-
empty SY::Composition
-
#eql? SY::Magnitude
-
#expand SY::Composition
-
exponentiation_string SY::ExpressibleInUnits
-
find_unit SY::ExpressibleInUnits
-
identity SY::Measure
-
#in SY::Magnitude
-
included SY::Unit
-
included SY::ExpressibleInUnits
-
included_in SY::ExpressibleInUnits
-
#infer_measure SY::Composition
-
#initialize SY::SignedMagnitude
-
#initialize SY::Quantity
-
#initialize SY::AbsoluteMagnitude
-
#initialize SY::Measure
-
#initialize SY::Unit
-
#initialize SY::Dimension
-
inspect SY.lambda { |input_ς, ßs, prefixes = []| input_ς = input_ςlambda { |input_ς, ßs, prefixes = []| input_ς = input_ς.to_slambda { |input_ς, ßs, prefixes = []| input_ς = input_ς.to_s.strip ßs = ßs.map &:to_s prefixes = ( prefixes.map( &:to_s ) << '' ).uniq # input string splitting input_ς_sections = input_ς.split '.' if input_ς_sections.empty? raise NameError, "Bad input string: '#{input_ς}'!" unless input_ς.empty? return [], [], [] end # analysis of input string sections input_ς_sections.each_with_object [[], [], []] do |_section_, memo| section = _section_.dup superscript_chars = SUPERSCRIPT.values # chop off the superscript tail, if any section.chop! while superscript_chars.any? { |ch| section.end_with? ch } # the set of candidate unit symbols candidate_ßs = ßs.select { |ß| section.end_with? ß } # seek candidate prefixes corresponding to candidate_ßs candidate_prefixes = candidate_ßs.map { |ß| section[ 0..((-1) - ß.size) ] } # see which possible prefixes can be confirmed confirmed_prefixes = candidate_prefixes.select { |x| prefixes.include? x } # complain if no symbol matches sec raise NameError, "Unknown unit: '#{section}'!" if confirmed_prefixes.empty? # pay attention to ambiguity in prefix/symbol pair if confirmed_prefixes.size > 1 then if confirmed_prefixes.any? { |x| x == '' } then # prefer empty prefixes chosen_prefix = '' else raise NameError, "Ambiguity in interpretation of '#{section}'!" end else chosen_prefix = confirmed_prefixes[0] end # Based on it, interpret the section parts: unit_ς = section[ (chosen_prefix.size)..(-1) ] suffix = _section_[ ((-1) - chosen_prefix.size - unit_ς.size)..(-1) ] # Make the exponent string suffix into the exponent number: exponent_ς = SUPERSCRIPT_DOWN[ suffix ] # Complain if bad: raise NameError, "Malformed exponent in #{_section_}!" if exponent_ς.nil? exponent_ς = "1" if exponent_ς == '' # empty exponent string means 1 exp = Integer exponent_ς raise NameError, "Zero exponents not allowed: #{exponent_ς}" if exp == 0 # and store the interpretation memo[0] << chosen_prefix; memo[1] << unit_ς; memo[2] << exp memo end }
-
#inspect SY::Magnitude
-
#inspect SY::Unit
-
inspect SY.lambda { |ßs, exps| raise ArgumentError unless ßslambda { |ßs, exps| raise ArgumentError unless ßs.size == expslambda { |ßs, exps| raise ArgumentError unless ßs.size == exps.size exps = exps.map{|e| Integer e } zipped = ßs.zip( exps ) clean = zipped.reject {|e| e[1] == 0 } # omit exponents equal to 1: clean.map{|ß, exp| "#{ß}#{exp == 1 ? "" : SUPERSCRIPT[exp]}" }.join "." }
-
#inspect SY::Dimension
-
#inspect SY::Quantity
-
instance SY::Unit
-
instances SY::Dimension
-
#inverse SY::Measure
-
#irreducible? SY::Quantity
-
#irreducible? SY::Composition
-
known_symbols SY::Unit
-
known_units SY::ExpressibleInUnits
-
linear SY::Measure
-
logarithmic SY::Measure
-
#magnitude SY::Quantity
-
#measure SY::Quantity
-
#method_added SY::ExpressibleInUnits::DetectRedefine
-
method_family SY::ExpressibleInUnits
-
#method_missing SY::ExpressibleInUnits
-
#negative? SY::Magnitude
-
negative_logarithmic SY::Measure
-
new SY::Dimension
-
#new_quantity SY::Composition
-
#new_standard_unit SY::Quantity
-
#nonnegative? SY::Magnitude
-
of SY::Magnitude
-
of SY::Quantity
-
of SY::Unit
-
one SY::Magnitude
-
parse_sps_using_all_prefixes SY::Unit
-
prefix_method_string SY::ExpressibleInUnits
-
#protect! SY::Quantity
-
#protected? SY::Quantity
-
#quantity SY::Magnitude
-
#quantity_by_prefix SY::Unit
-
#r SY::Measure
-
#ratio SY::Measure
-
#read SY::Quantity
-
#read SY::Measure
-
#reframe SY::Unit
-
#reframe SY::Magnitude
-
#relative SY::Quantity
-
#relative SY::Magnitude
-
#relative? SY::Quantity
-
#respond_to_missing? SY::ExpressibleInUnits
-
#round SY::Magnitude
-
#set_colleague SY::Quantity
-
#set_composition SY::Quantity
-
#set_measure SY::Quantity
-
#short= SY::Unit
-
#simple? SY::Quantity
-
#simple? SY::Composition
-
simple_offset SY::Measure
-
simple_scale SY::Measure
-
#simplify SY::Composition
-
singular SY::Composition
-
#singular? SY::Composition
-
#standard SY::Quantity
-
standard SY::Quantity
-
standard SY::Unit
-
#standard! SY::Quantity
-
#standard? SY::Quantity
-
standard_quantities SY::Dimension
-
#standard_quantity SY::Dimension
-
#standard_unit SY::Quantity
-
#standardish? SY::Quantity
-
#subtract SY::AbsoluteMagnitude
-
#take SY::AbsoluteMagnitude
-
#to_a SY::Dimension
-
#to_composition SY::Dimension
-
#to_hash SY::Dimension
-
#to_magnitude SY::Magnitude
-
#to_quantity SY::Composition
-
#to_s SY::Dimension
-
#to_s SY::Quantity
-
#to_s SY::Magnitude
-
#to_s SY::Unit
-
#unit SY::Quantity
-
unit_namespace SY::ExpressibleInUnits
-
#units SY::Quantity
-
#unprotect! SY::Quantity
-
#w SY::Measure
-
#warns SY::Unit
-
wildcard_zero Matrix
-
#write SY::Quantity
-
#write SY::Measure
-
zero SY::Magnitude
-
zero SY::Dimension
-
#zero? SY::Dimension
-
#°C SY::Numeric