Last active
August 29, 2015 14:09
-
-
Save nicolasbock/a2506fe89f66790616ed to your computer and use it in GitHub Desktop.
graph cost vs. sparsemath
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
import matplotlib.pyplot as plt | |
import numpy | |
N = 100 | |
m = 10 | |
M = numpy.array([ M for M in range(1, N) ]) | |
y_graph = N/M*(M+2*m)**3 | |
y_sparse = N*m**2 | |
plt.plot(M, y_graph/y_sparse) | |
plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment