Move set to simulator for future diagnostic purposes
This commit is contained in:
parent
9f3089c232
commit
795bb1d10d
|
@ -61,8 +61,10 @@ class Simulator:
|
||||||
j = i - int(heavyVal/self.shape.vpn2)
|
j = i - int(heavyVal/self.shape.vpn2)
|
||||||
start = offset+( j *self.shape.chi)
|
start = offset+( j *self.shape.chi)
|
||||||
end = offset+((j+1)*self.shape.chi)
|
end = offset+((j+1)*self.shape.chi)
|
||||||
r = rows[start:end]
|
r = list(set(rows[start:end]))
|
||||||
c = columns[start:end]
|
c = list(set(columns[start:end]))
|
||||||
|
r.sort()
|
||||||
|
c.sort()
|
||||||
val = Validator(i, int(not i!=0), self.logger, self.shape, r, c)
|
val = Validator(i, int(not i!=0), self.logger, self.shape, r, c)
|
||||||
else:
|
else:
|
||||||
val = Validator(i, int(not i!=0), self.logger, self.shape)
|
val = Validator(i, int(not i!=0), self.logger, self.shape)
|
||||||
|
|
|
@ -69,8 +69,8 @@ class Validator:
|
||||||
# random.seed(self.ID)
|
# random.seed(self.ID)
|
||||||
self.nodeClass = 1 if (self.ID <= shape.numberNodes * shape.class1ratio) else 2
|
self.nodeClass = 1 if (self.ID <= shape.numberNodes * shape.class1ratio) else 2
|
||||||
self.vpn = self.shape.vpn1 if (self.nodeClass == 1) else self.shape.vpn2
|
self.vpn = self.shape.vpn1 if (self.nodeClass == 1) else self.shape.vpn2
|
||||||
self.rowIDs = set(rows) if rows else unionOfSamples(range(self.shape.blockSize), self.shape.chi, self.vpn)
|
self.rowIDs = rows if rows else unionOfSamples(range(self.shape.blockSize), self.shape.chi, self.vpn)
|
||||||
self.columnIDs = set(columns) if columns else unionOfSamples(range(self.shape.blockSize), self.shape.chi, self.vpn)
|
self.columnIDs = columns if columns else unionOfSamples(range(self.shape.blockSize), self.shape.chi, self.vpn)
|
||||||
self.rowNeighbors = collections.defaultdict(dict)
|
self.rowNeighbors = collections.defaultdict(dict)
|
||||||
self.columnNeighbors = collections.defaultdict(dict)
|
self.columnNeighbors = collections.defaultdict(dict)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue