| 1 | initial version |
In a compact form:
signs = ['=','=','>=','>=','>=','<=','<=','<=','<=','<=']
shift = [sum(len(signs[i]) for i in range(j)) for j in range(len(signs))]
Matrix(ZZ, 10, 18, lambda i,j: 0 if j<shift[i] or j>shift[i]+1 else -1 if j==shift[i] and signs[i]=='>=' else 0 if j==shift[i]+1 and signs[i]=='=' else 1)
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.