Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def simpletest():
- '''
- I am going to just test the algo listing with assumption
- degree n = 2
- max = dim(m_p(n-1)) = 3,
- so j1 j2 and upto j3 are required for every entry into m_p(degree2)
- Lets just print j1,j2,j3 to verify if the function
- works in other general version where the number of for loops is not known
- '''
- n = 2
- count = 0
- for j1 in range(n, -1, -1):
- for j2 in range(n -j1, -1, -1):
- j3 = (n-(j1+j2))
- count = count + 1
- print 'To calculate m_p(%d)[%d], j1,j2,j3 = ' %(n,count), j1, j2, j3
- assert(count==6) # just a checkpoint. See P.169 for a proof
- print 'No. of entries =', count
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement