The Wayback Machine - https://web.archive.org/web/20260207180818/https://github.com/TheAlgorithms/Python/pull/5113
Skip to content

Jacobi Iteration Method#5113

Merged
poyea merged 20 commits intoTheAlgorithms:masterfrom
eviltypha:master
Nov 9, 2021
Merged

Jacobi Iteration Method#5113
poyea merged 20 commits intoTheAlgorithms:masterfrom
eviltypha:master

Conversation

@eviltypha
Copy link
Contributor

Describe your change:

  • Add an algorithm?
  • Fix a bug or typo in an existing algorithm?
  • Documentation change?

Checklist:

  • I have read CONTRIBUTING.md.
  • This pull request is all my own work -- I have not plagiarized.
  • I know that pull requests will not be merged if they fail the automated tests.
  • This PR only changes one algorithm file. To ease review, please open separate PRs for separate algorithms.
  • All new Python files are placed inside an existing directory.
  • All filenames are in all lowercase characters with no spaces or dashes.
  • All functions and variable names follow Python naming conventions.
  • All function parameters and return values are annotated with Python type hints.
  • All functions have doctests that pass the automated testing.
  • All new algorithms have a URL in its comments that points to Wikipedia or other similar explanation.
  • If this pull request resolves one or more open issues then the commit message contains Fixes: #{$ISSUE_NO}.
Added this method in arithmetic_analysis folder. This method is used to solve system of linear equations.
@ghost ghost added awaiting reviews This PR is ready to be reviewed tests are failing Do not merge until tests pass labels Oct 7, 2021
@eviltypha
Copy link
Contributor Author

Hi @cclauss, I've made the necessary changes for tests are failing. Please review it again

@ghost ghost removed the tests are failing Do not merge until tests pass label Oct 15, 2021
@eviltypha
Copy link
Contributor Author

Hi @cclauss, made changes as suggested. Please review

@eviltypha
Copy link
Contributor Author

My bad, it's done @cclauss

@ghost ghost added the tests are failing Do not merge until tests pass label Oct 15, 2021
Co-authored-by: Christian Clauss <cclauss@me.com>
@eviltypha eviltypha requested a review from cclauss October 15, 2021 12:10
Co-authored-by: Christian Clauss <cclauss@me.com>
eviltypha and others added 5 commits October 16, 2021 16:19
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
@eviltypha eviltypha requested a review from cclauss October 19, 2021 08:44
@ghost ghost removed the tests are failing Do not merge until tests pass label Oct 19, 2021
@eviltypha eviltypha closed this Oct 19, 2021
@eviltypha eviltypha reopened this Oct 19, 2021
@eviltypha
Copy link
Contributor Author

Hi @cclauss, the recent commit seems to be passing the workflows from my forked repo, do look into it.

@TheAlgorithms TheAlgorithms deleted a comment from A469L372K397 Oct 20, 2021
@eviltypha
Copy link
Contributor Author

Hi @cclauss, all the bot checks have passed, could you have a look into this

Copy link
Member

@poyea poyea left a comment

Choose a reason for hiding this comment

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

Thank you for your pull request!🤩

@ghost ghost removed the awaiting reviews This PR is ready to be reviewed label Nov 9, 2021
@ghost ghost added the awaiting reviews This PR is ready to be reviewed label Nov 9, 2021
@ghost ghost removed the awaiting reviews This PR is ready to be reviewed label Nov 9, 2021
Comment on lines +143 to +156
is_diagonally_dominant = True

for i in range(0, rows):
sum = 0
for j in range(0, cols - 1):
if i == j:
continue
else:
sum += table[i][j]

if table[i][i] <= sum:
raise ValueError("Coefficient matrix is not strictly diagonally dominant")

return is_diagonally_dominant
Copy link
Member

Choose a reason for hiding this comment

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

We can throw in jacobi_iteration_method and always return a boolean here.

@poyea poyea merged commit c3d1ff0 into TheAlgorithms:master Nov 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants