Commit Graph

11 Commits

Author SHA1 Message Date
Gabriel Ozouf
52dcd8e749 [poincare/unit] Restructure Unit
1. Information about a unit's dimension now uses inheritance.
   _m is an instance of DistanceAlias, which is derived from Alias.
   A UnitNode now keeps a pointer to an Alias and one to a Prefix.
   All aliases are still defined as constexpr.
   This cleans up a lot of the code used namely for computing the
   additional outputs in Calculation.

2. Instead of being defined with a string, each unit is described by its
   ratio with the base SI unit (ex: _L is 0.001 instead of "0.001_m^3").
   This greatly speeds up the calculations using units, as the algorithm
   to find the best unit used to parse the definition.

Change-Id: I4d6ed6ad4cb967026a3f01a335aec270066e2b9f
2020-11-04 15:11:45 +01:00
Émilie Feral
b6ee72bc21 [poincare] Clean tests on Unit 2020-06-04 14:50:07 +02:00
Émilie Feral
62e2e733b2 [poincare] Add comment on unit tests 2020-06-04 14:50:03 +02:00
Émilie Feral
22fd3388ed [poincare] Add tests on Unit::BuildTimeSplit 2020-06-04 14:50:03 +02:00
Émilie Feral
397aac27c5 [poincare] Add test on Unit helpers 2020-06-04 14:50:03 +02:00
Émilie Feral
d9af0300d4 [poincare] Decimal: change order definition on Decimal expression
Now, Decimal node "1.000E3" is not equal to Decimal node "1E3" node anymore.
This prevents from using double comparison (which is sometimes wrong due to
double precision) to implement decimal comparison.
2019-10-02 18:20:57 +02:00
Émilie Feral
cedcab21ec [poincare] Tidy tests and add TODO for tests that need to be completed 2019-08-08 17:22:04 +02:00
Émilie Feral
7b5f3c570d [poincare] Change the way Expression are built 2019-02-21 11:29:35 +01:00
Lionel Debroux
1a8c6b6ae9 [poincare, escher, ion, apps] Split the huge umbrella header poincare.h, to reduce build time.
This should be a NFC, but surprisingly, it also reduces size... so what does it change ?
2018-10-23 11:49:09 +02:00
Léa Saviot
3ab83388dd [poincare] Make tests compile 2018-09-03 15:05:19 +02:00
Romain Goyet
2fa52e2fef [poincare] Add a failing test on Expression 2018-08-13 09:04:03 +02:00