-
Notifications
You must be signed in to change notification settings - Fork 0
/
testing.py
75 lines (42 loc) · 814 Bytes
/
testing.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#V
#E
#R
#C
#X
import numpy as np
S = np.array([50, 50, 80, 30, 110])
R = np.array([[3, 0, 1500], [0, 1, 1000], [4, 0, 500], [1, 0, 1000]])
latmat = np.array([[0, 100], [2, 200], [1, 300]])
C = [0, 0, 0]
Cnames = {}
maxSize = 100
#R = np.array([2, 1], [3, 4])
#print(R)
#print(R[:, 2])
Rh = R[R[:,2].argsort()]#np.sort(R, 0)
print(Rh)
#print(Rh[-1,-1])
n = Rh.shape[0]
#print(n)
#print(latmat)
lh = latmat[latmat[:,1].argsort()]
Rsort = Rh
Lsort = lh
print(lh)
for i in range(n-1, -1, -1):
#print(i)
#print(Rh[i, -1])
endpoint = Rsort[i, 1]
#print(e)
# GET ENDPOINT L MATRIX
videoIndex = Rsort[i, 0]
videoSize = S[videoIndex]
vi = Rh[i, 0]
vs = S[vi]
print(vs)
print(vi in Cnames)
if e not in Cnames:
Cnames[e] = []
Cnames[e].append(vi)
print(Cnames)
print(np.mt)