Skip to content

Conversation

@CJary
Copy link
Collaborator

@CJary CJary commented May 12, 2025

Draft Pull Request for this issue.

#134

CJary added 9 commits March 2, 2025 15:07
Implemented the Unit.hpp and then add the base in the Real.hpp/Real.cpp
Added a function ConvertTo for the future when we have to convert
between Units

Signed-off-by: Jary Chen <jarychenu24@gmail.com>
Implemented the Unit.hpp and then add the base in the
Variable.hpp/Variable.cpp

Signed-off-by: Jary Chen <jarychenu24@gmail.com>
Installed boost and introduced boost into Real.cpp. Basic Implementation
of ConvertTo function and added a private GetFactor function. Still
needs unit testing for this!

Signed-off-by: Jary Chen <jarychenu24@gmail.com>
Added some minor Units, adjusted some minor if condition issues in
Real.cpp. Added some basic TestCases in AddTests.cpp

Signed-off-by: Jary Chen <jarychenu24@gmail.com>
Introduce the UnitGraph.hpp for more robust and complex conversion
instead of the manual conversion conditions. This will be the template
hpp. Building the chain of equation conversion using Graph Algo.

Signed-off-by: Jary Chen <jarychenu24@gmail.com>
Implemented the UnitGraph.cpp. Every Vertex represents the unit with a
given index and edge represents the factor of conversion. Initializing
standard BFS Graph Algorthim to search the graph.

Signed-off-by: Jary Chen <jarychenu24@gmail.com>
Reference to the Global static Instance of the UnitGraph so we can reuse
the conversion Algorthim without creating an instance each time.

Signed-off-by: Jary Chen <jarychenu24@gmail.com>
Made a static globalGraph and a central place for all the conversion to
be added and initialized only once

Signed-off-by: Jary Chen <jarychenu24@gmail.com>
Revised the Real.hpp/cpp to use UnitGraph and replace the original
template of convertTo. Edit Some Test Cases.

Signed-off-by: Jary Chen <jarychenu24@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant