-
Notifications
You must be signed in to change notification settings - Fork 80
Operator Overloading for Constant Class #178
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Hey @8hantanu, Codacy is not allowed to analyse my PR because it is on Simplify Branch. (not dev branch)* |
|
@Alii-Khaled Not a problem. As long as the code is complying with Travis CI tests, it's good, Anyway, I will add the simplify branch to codacy soon. |
Making Constant initialization much easier & changed Tests according to that change.
|
@8hantanu Done. 👍 |
8hantanu
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add the test cases for the following in test_functions.py?
- Constant + Expression
- Constant - Expression
- Expression - Constant
- Constant * Expression
- Constant / Expression
- Expression / Constant
- Constant ** Constant
Co-Authored-By: Alii-Khaled <47671499+Alii-Khaled@users.noreply.github.com>
I have Added the following:
Addition, Subtraction, Multiplication, division & Power Operator Overloading functions for Constant Class.
Many Test cases for all these Functions.
isZero() function in Function Class that returns whether that Function ( constant or anything else ) is Zero or not, in order to make calculations according to its output. ( for example multiplication by zero )
I have Modified Constant Exponential Class to work well with Constant exponents as ( 5^(x+3) ).
-For Code Coverage : I found out that during Implementation of Operator overloading function Code coverage could decrease a little bit - Although here I increased Code coverage by 0.7% - , but once we finish All Classes we will rapidly increase code coverage as we will remove the existing Add/Sub & Mul/Div .
I hope @8hantanu , @sidkothiyal Review the Code to improve it and to let us work on other Classes in a better way.