-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPrototype.py
32 lines (25 loc) · 887 Bytes
/
Prototype.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
import numpy as np
import Point
class Prototype(Point.Point):
#Variables :
#reseau : liste de points
def __init__(self):
super(Point,self).__init__()
self.reseau = []
def __init__(self, id, coordonnees, label, reseau):
super(Point.Point,self).__init__()
self.id=id
self.coordonnees = coordonnees
self.label=label
self.reseau = reseau
def getReseau(self):
return self.reseau
def setReseau(self, reseau):
self.reseau = reseau
def reseauToMatrix(self):
reseau = np.zeros((len(self.reseau), len(self.reseau[0].getCoordonnees())))
for i in range (len(self.reseau)):
coordonnees = self.reseau[i].getCoordonnees()
for j in range (len(coordonnees)):
reseau[i,j] = coordonnees[j]
return reseau