Module ImportFrom alias Import alias identifier Import alias identifier FunctionDef arguments args NameParam NameParam defaults body Return CompareGt NameLoad NameLoad decorator_list ClassDef bases body FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr ListLoad Str Assign AttributeStore NameLoad attr Num decorator_list FunctionDef arguments args NameParam NameParam defaults body If CompareEq AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad AugAssignAdd AttributeStore NameLoad attr Num Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr orelse If CompareLt AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad AugAssignAdd AttributeStore NameLoad attr Num Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr orelse If UnaryOpNot Call AttributeLoad NameLoad attr NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Num body Assign SubscriptStore AttributeLoad NameLoad attr Index Num NameLoad Expr Call AttributeLoad NameLoad attr Num Return decorator_list FunctionDef arguments args NameParam NameParam defaults body If CompareEq NameLoad Num body Return Expr Str If Call AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Call NameLoad BinOpDiv NameLoad Num body Assign TupleStore SubscriptStore AttributeLoad NameLoad attr Index NameLoad SubscriptStore AttributeLoad NameLoad attr Index Call NameLoad BinOpDiv NameLoad Num TupleLoad SubscriptLoad AttributeLoad NameLoad attr Index Call NameLoad BinOpDiv NameLoad Num SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad BinOpDiv NameLoad Num Return decorator_list FunctionDef arguments args NameParam NameParam defaults body If CompareGt BinOpMult Num NameLoad AttributeLoad NameLoad attr body Return Assign NameStore Num If CompareLt BinOpMult Num NameLoad AttributeLoad NameLoad attr body If Call AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index BinOpMult NameLoad Num SubscriptLoad AttributeLoad NameLoad attr Index BinOpAdd BinOpMult NameLoad Num Num body Assign NameStore BinOpMult NameLoad Num orelse Assign NameStore BinOpAdd BinOpMult NameLoad Num Num orelse Assign NameStore BinOpMult NameLoad Num If UnaryOpNot Call AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index NameLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad body Assign TupleStore SubscriptStore AttributeLoad NameLoad attr Index NameLoad SubscriptStore AttributeLoad NameLoad attr Index NameLoad TupleLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Return decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign TupleStore SubscriptStore AttributeLoad NameLoad attr Index NameLoad SubscriptStore AttributeLoad NameLoad attr Index AttributeLoad NameLoad attr TupleLoad SubscriptLoad AttributeLoad NameLoad attr Index AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr AugAssignSub AttributeStore NameLoad attr Num Expr Call AttributeLoad NameLoad attr NameLoad Pass decorator_list FunctionDef arguments args NameParam NameParam defaults body TryExcept body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad handlers ExceptHandler type NameLoad body Assign NameStore NameLoad If CompareNotEq NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list decorator_list
N/A __future__ division N/A numpy np N/A scipy sp heap_judge N/A N/A a b N/A N/A N/A N/A a b N/A Heap N/A N/A __init__ N/A N/A self K compare N/A None heap_judge N/A N/A 
			'K' 		is the parameter to restrict the length of Heap
						!!! when K is confirmed,the Min heap contain Max K elements
			                        		  while Max heap contain Min K elements
			'compare' 	is the compare function which return a BOOL when pass two variable
						default is Max heap
		 N/A N/A self K K N/A N/A self compare compare N/A N/A self heap N/A # N/A N/A self counter 0 N/A insert N/A N/A self a N/A N/A N/A N/A N/A self K None N/A N/A N/A N/A N/A self heap append a N/A N/A self counter 1 N/A N/A N/A self up N/A self counter N/A N/A N/A N/A self counter N/A self K N/A N/A N/A N/A N/A self heap append a N/A N/A self counter 1 N/A N/A N/A self up N/A self counter N/A N/A N/A N/A N/A self compare a N/A N/A self heap N/A 1 N/A N/A N/A N/A self heap N/A 1 a N/A N/A N/A self down 1 N/A N/A up N/A N/A self index N/A N/A N/A N/A index 1 N/A N/A N/A 
		print index
		for t in range(index+1):
			if t==0:
				continue
			print self.heap[t].x
		print 
		 N/A N/A N/A self compare N/A N/A self heap N/A index N/A N/A self heap N/A N/A int N/A index 2 N/A N/A N/A N/A N/A self heap N/A index N/A N/A self heap N/A N/A int N/A index 2 N/A N/A N/A self heap N/A N/A int N/A index 2 N/A N/A self heap N/A index N/A N/A N/A self up N/A int N/A index 2 N/A N/A down N/A N/A self index N/A N/A N/A N/A N/A 2 index N/A self counter N/A N/A N/A tar_index 0 N/A N/A N/A 2 index N/A self counter N/A N/A N/A N/A self compare N/A N/A self heap N/A N/A index 2 N/A N/A self heap N/A N/A N/A index 2 1 N/A N/A tar_index N/A index 2 N/A N/A tar_index N/A N/A index 2 1 N/A N/A tar_index N/A index 2 N/A N/A N/A N/A self compare N/A N/A self heap N/A index N/A N/A self heap N/A tar_index N/A N/A N/A N/A N/A self heap N/A index N/A N/A self heap N/A tar_index N/A N/A N/A self heap N/A tar_index N/A N/A self heap N/A index N/A N/A N/A self down tar_index N/A N/A delete N/A N/A self index N/A N/A N/A N/A N/A N/A self heap N/A index N/A N/A self heap N/A N/A self counter N/A N/A N/A self heap N/A N/A self counter N/A N/A self heap N/A index N/A N/A N/A N/A self heap pop N/A N/A self counter 1 N/A N/A N/A self down index N/A N/A delete_ele N/A N/A self a N/A N/A N/A N/A N/A t N/A N/A N/A self heap index a N/A N/A N/A ValueError N/A N/A t None N/A N/A t None N/A N/A N/A N/A self delete t N/A t N/A N/A