Skip to content

Issue 10 partial fraction class#14

Open
Jared-Gibson wants to merge 13 commits into
masterfrom
issue-10-partial-fraction-class
Open

Issue 10 partial fraction class#14
Jared-Gibson wants to merge 13 commits into
masterfrom
issue-10-partial-fraction-class

Conversation

@Jared-Gibson
Copy link
Copy Markdown
Member

Description of the changes:

-Added framework for a partial fraction decomposition class
-Two methods have been implemented: splitEquationString and createCoeffMatrix
-splitEquationString is working as intended & is unit tested
-createCoeffMatrix cannot be tested as it relies on the Algebra class (which hasn't been merged into master yet); I did add unit testing for this method when Algebra does get merged
-All other methods that have not been implemented throw a "Not implemented" exception

-added methods that I believe will be useful in creating a Partial Fraction Decomposition class
-Added the work-flow for PartialFracDecomp
-Added implementation for splitEquationString
-renamed factorDenom to factorExpr
-changed return value of factorExpr from a string to use a more useful representation of an equation
-added code for finding LHS using Algebra class (waiting on pull requests)
-added code for finding RHS using Algebra class (waiting on pull requests)
-LHS calculation was incorrect; numerator just needs to have all its factors multiplied
-fixed error in matrix resizing; the height of the matrix is determined by the largest power of the denominator not the numerator
-iterates through RHSexpressions
-for each string in RHSexpressions, we iterate backwards since the constant will always be on the right hand side of the expression; convert the characters into an int to store into RHScoeff
-uses similar logic to RHS, just without the outer for-loop
-sketching out the matrix format
-added for-loops that add expression coefficients to a 2x2 integer matrix
-This method does not fully work as it requires the Algebra class which is not implemented at this time; however, I wrote a test case for it anyway
Copy link
Copy Markdown
Member

@theEhlien theEhlien left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! The tests all ran for me as well and the code that you prepared for when the Algebra class is available also looks good. I didn't see any obvious bugs and your commenting looks consistent and clean.

@smalls4894 smalls4894 self-requested a review May 4, 2020 00:53
@smalls4894
Copy link
Copy Markdown

Tests all worked fine, good documentation, class functions look great. This looks ready to add on

@nreiner
Copy link
Copy Markdown

nreiner commented May 4, 2020

Just finished running the code, and it ran smoothly for me as well! I appreciated how easy the comments were to follow, as well as the depiction of the matrix represented as comments, nicely done!

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.

4 participants