Created
October 4, 2016 08:06
-
-
Save bmtgoncalves/0bb4532ea9decb39b0c2e8e62cde83fb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Perform the power method for "iter" iterations | |
def Power_Method(G, iter): | |
N = G.shape[0] | |
x0 = np.ones(N)/N | |
for i in range(iter): | |
x0 = np.dot(G, x0) | |
return x0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment