-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathaddanalysis.py
69 lines (36 loc) · 1.36 KB
/
addanalysis.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
# -*- coding: utf-8 -*-
"""
Created on Mon Apr 12 04:46:05 2021
@author: 18moh
"""
from preprocess import fetch_faculty
from faculty import Year, Faculty
from interface import getApp as gp
class ManageGraph:
def __init__(self):
faculty, names = fetch_faculty()
self.nodes=[]
self.edges=[]
for x in faculty:
if(faculty[x].managment==True):
self.nodes.append(x)
p=faculty[x].papers
for y in p:
for a in y.authors:
if(a in names):
self.edges.append((x, a))
class PositionGraph:
#target='Lecturer'
def __init__(self, target):
faculty, names = fetch_faculty()
self.nodes=[]
self.edges=[]
for x in faculty:
if(faculty[x].position==target):
self.nodes.append(x)
for x in self.nodes:
p=faculty[x].papers
for y in p:
for a in y.authors:
if(a in self.nodes):
self.edges.append((x,a))