def lattice_render_webpage(): args = request.args if len(args) == 0: counts = get_stats().counts() dim_list = range(2, counts['max_dim'] + 1, 1) class_number_list = range(1, counts['max_class_number'] + 1, 1) det_list_endpoints = [1, 100, 200, 300] if counts['max_det'] > 300: det_list_endpoints = det_list_endpoints + range( 400, (floor(380 / 100) + 2) * 100, 100) det_list = [ "%s-%s" % (start, end - 1) for start, end in zip( det_list_endpoints[:-1], det_list_endpoints[1:]) ] info = { 'dim_list': dim_list, 'class_number_list': class_number_list, 'det_list': det_list } credit = lattice_credit t = 'Integral Lattices' bread = [('Integral Lattices', url_for(".lattice_render_webpage"))] info['learnmore'] = [] info['counts'] = get_stats().counts() return render_template("lattice-index.html", info=info, credit=credit, title=t, bread=bread) else: return lattice_search(**args)
def lattice_render_webpage(): args = request.args if len(args) == 0: counts = get_stats().counts() dim_list = range(2, counts['max_dim'] + 1, 1) class_number_list = range(1, counts['max_class_number'] + 1, 1) det_list_endpoints = [ 1, 1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000, 10000 ] # if counts['max_det']>3000: # det_list_endpoints=det_list_endpoints+range(3000, max(int(round(counts['max_det']/1000)+2)*1000, 10000), 1000) det_list = [ "%s-%s" % (start, end - 1) for start, end in zip( det_list_endpoints[:-1], det_list_endpoints[1:]) ] info = { 'dim_list': dim_list, 'class_number_list': class_number_list, 'det_list': det_list } credit = lattice_credit t = 'Integral Lattices' bread = [('Lattice', url_for(".lattice_render_webpage"))] info['counts'] = get_stats().counts() return render_template("lattice-index.html", info=info, credit=credit, title=t, learnmore=learnmore_list_remove('Completeness'), bread=bread) else: return lattice_search(**args)
def random_lattice(): # Random Lattice from sage.misc.prandom import randint n = get_stats().counts()['nlattice'] n = randint(0, n - 1) C = getDBConnection() res = C.Lattices.lat.find()[n] return redirect(url_for(".render_lattice_webpage", label=res['label']))
def random_lattice(): # Random Lattice from sage.misc.prandom import randint n = get_stats().counts()['nlattice'] n = randint(0,n-1) C = getDBConnection() res = C.Lattices.lat.find()[n] return redirect(url_for(".render_lattice_webpage", label=res['label']))
def lattice_render_webpage(): args = request.args if len(args) == 0: counts = get_stats().counts() dim_list= range(2, counts['max_dim']+1, 1) class_number_list=range(1, counts['max_class_number']+1, 1) det_list_endpoints = [1, 1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000, 10000] # if counts['max_det']>3000: # det_list_endpoints=det_list_endpoints+range(3000, max(int(round(counts['max_det']/1000)+2)*1000, 10000), 1000) det_list = ["%s-%s" % (start, end - 1) for start, end in zip(det_list_endpoints[:-1], det_list_endpoints[1:])] info = {'dim_list': dim_list,'class_number_list': class_number_list,'det_list': det_list} credit = lattice_credit t = 'Integral Lattices' bread = [('Lattice', url_for(".lattice_render_webpage"))] info['counts'] = get_stats().counts() return render_template("lattice-index.html", info=info, credit=credit, title=t, learnmore=learnmore_list_remove('Completeness'), bread=bread) else: return lattice_search(**args)
def lattice_render_webpage(): args = request.args if len(args) == 0: # counts = get_stats().counts() dim_list= range(1, 11, 1) max_class_number=20 class_number_list=range(1, max_class_number+1, 1) det_list_endpoints = [1, 5000, 10000, 20000, 25000, 30000] # if counts['max_det']>3000: # det_list_endpoints=det_list_endpoints+range(3000, max(int(round(counts['max_det']/1000)+2)*1000, 10000), 1000) det_list = ["%s-%s" % (start, end - 1) for start, end in zip(det_list_endpoints[:-1], det_list_endpoints[1:])] name_list = ["A2","Z2", "D3", "D3*", "3.1942.3884.56.1", "A5", "E8", "A14", "Leech"] info = {'dim_list': dim_list,'class_number_list': class_number_list,'det_list': det_list, 'name_list': name_list} credit = lattice_credit t = 'Integral Lattices' bread = [('Lattice', url_for(".lattice_render_webpage"))] info['counts'] = get_stats().counts() return render_template("lattice-index.html", info=info, credit=credit, title=t, learnmore=learnmore_list_remove('Completeness'), bread=bread) else: return lattice_search(**args)