squants icon indicating copy to clipboard operation
squants copied to clipboard

implement unimplemented functions & make new types

Open derekmorr opened this issue 8 years ago • 2 comments

We have several undefined types and partial functions in squants. We should fix these for the next release:

~/squants/shared/src/main/scala/squants % grep -r "???" .
./electro/Capacitance.scala:  def /(that: Length) = ??? // returns Permittivity
./electro/ElectricCharge.scala:  def /(that: Length) = ??? // returns LinearElectricChargeDensity
./electro/ElectricCharge.scala:  def /(that: Area) = ??? // returns AreaElectricChargeDensity
./electro/ElectricCharge.scala:  def /(that: Volume) = ??? // returns ElectricChargeDensity
./electro/ElectricCharge.scala:  def /(that: Mass) = ??? // returns ElectricChargeMassRatio
./electro/ElectricCurrent.scala:  def /(that: Length) = ??? // returns MagneticFieldStrength
./electro/ElectricCurrent.scala:  def /(that: Area) = ??? // returns ElectricCurrentDensity
./electro/ElectricPotential.scala:  def /(that: Length) = ??? // returns ElectricFieldStrength
./electro/Inductance.scala:  def /(that: Length) = ??? // returns Permeability
./energy/Energy.scala:  def /(that: ChemicalAmount) = ??? // return MolarEnergy
./energy/Energy.scala:  def /(that: Area) = ??? // Insolation, Energy Area Density
./energy/Power.scala:  def /(that: Volume) = ??? // Power Density
./energy/SpecificEnergy.scala:  def /(that: Time) = ??? // returns AbsorbedEnergyRate
./market/Money.scala:  def primaryUnit = ??? // Should not be used with Money - drawn from MoneyContext instead
./market/Money.scala:  def siUnit = ??? // Should not be used with Money - drawn from MoneyContext instead
./market/Money.scala:  def units = ??? // Should not be used with Money - drawn from MoneyContext instead
./market/Money.scala:  protected def converterFrom: Double ⇒ Double = ???
./market/Money.scala:  protected def converterTo: Double ⇒ Double = ???
./mass/ChemicalAmount.scala:  def /(that: Volume) = ??? // returns SubstanceConcentration
./motion/Force.scala:  def /(that: Length) = ??? // return SurfaceTension
./motion/Pressure.scala:  def *(that: Time) = ??? // returns DynamicViscosity
./space/Volume.scala:  def /(that: Mass) = ??? // returns SpecificVolume (inverse of Density)
./space/Volume.scala:  def /(that: ChemicalAmount) = ??? // return MolarVolume

Not all of these can be implemented (the ones in Money for example), but for many of the rest we should just get it done. This can be spread across multiple maintainers so the burden doesn't fall on one person.

derekmorr avatar May 31 '17 14:05 derekmorr

Hi, I think I could help. I'll start with the electro ones...

nvinuesa avatar Jun 06 '17 19:06 nvinuesa

Thanks!

derekmorr avatar Jun 06 '17 21:06 derekmorr