github.com/jingcheng-WU/gonum@v0.9.1-0.20210323123734-f1a2a11a8f7b/unit/constant/defined_types.go (about) 1 // Code generated by "go generate github.com/jingcheng-WU/gonum/unit/constant”; DO NOT EDIT. 2 3 // Copyright ©2019 The Gonum Authors. All rights reserved. 4 // Use of this source code is governed by a BSD-style 5 // license that can be found in the LICENSE file. 6 7 // +build ignore 8 9 package main 10 11 import "github.com/jingcheng-WU/gonum/unit" 12 13 var definedTypes = []struct { 14 unit unit.Uniter 15 name string 16 }{ 17 {unit: unit.AbsorbedRadioactiveDose(1), name: "unit.AbsorbedRadioactiveDose"}, 18 {unit: unit.Acceleration(1), name: "unit.Acceleration"}, 19 {unit: unit.Angle(1), name: "unit.Angle"}, 20 {unit: unit.Area(1), name: "unit.Area"}, 21 {unit: unit.Capacitance(1), name: "unit.Capacitance"}, 22 {unit: unit.Charge(1), name: "unit.Charge"}, 23 {unit: unit.Conductance(1), name: "unit.Conductance"}, 24 {unit: unit.Current(1), name: "unit.Current"}, 25 {unit: unit.Dimless(1), name: "unit.Dimless"}, 26 {unit: unit.Energy(1), name: "unit.Energy"}, 27 {unit: unit.EquivalentRadioactiveDose(1), name: "unit.EquivalentRadioactiveDose"}, 28 {unit: unit.Force(1), name: "unit.Force"}, 29 {unit: unit.Frequency(1), name: "unit.Frequency"}, 30 {unit: unit.Inductance(1), name: "unit.Inductance"}, 31 {unit: unit.Length(1), name: "unit.Length"}, 32 {unit: unit.LuminousIntensity(1), name: "unit.LuminousIntensity"}, 33 {unit: unit.MagneticFlux(1), name: "unit.MagneticFlux"}, 34 {unit: unit.MagneticFluxDensity(1), name: "unit.MagneticFluxDensity"}, 35 {unit: unit.Mass(1), name: "unit.Mass"}, 36 {unit: unit.Mole(1), name: "unit.Mole"}, 37 {unit: unit.Power(1), name: "unit.Power"}, 38 {unit: unit.Pressure(1), name: "unit.Pressure"}, 39 {unit: unit.Radioactivity(1), name: "unit.Radioactivity"}, 40 {unit: unit.Resistance(1), name: "unit.Resistance"}, 41 {unit: unit.Temperature(1), name: "unit.Temperature"}, 42 {unit: unit.Time(1), name: "unit.Time"}, 43 {unit: unit.Torque(1), name: "unit.Torque"}, 44 {unit: unit.Velocity(1), name: "unit.Velocity"}, 45 {unit: unit.Voltage(1), name: "unit.Voltage"}, 46 {unit: unit.Volume(1), name: "unit.Volume"}, 47 } 48 49 func definedEquivalentOf(q unit.Uniter) string { 50 for _, u := range definedTypes { 51 if unit.DimensionsMatch(q, u.unit) { 52 return u.name 53 } 54 } 55 return "" 56 }