Move set to simulator for future diagnostic purposes

This commit is contained in:
Leonardo Bautista-Gomez 2023-03-30 13:15:42 +02:00
parent 9f3089c232
commit 795bb1d10d
2 changed files with 6 additions and 4 deletions

View File

@ -61,8 +61,10 @@ class Simulator:
j = i - int(heavyVal/self.shape.vpn2)
start = offset+( j *self.shape.chi)
end = offset+((j+1)*self.shape.chi)
r = rows[start:end]
c = columns[start:end]
r = list(set(rows[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)
else:
val = Validator(i, int(not i!=0), self.logger, self.shape)

View File

@ -69,8 +69,8 @@ class Validator:
# random.seed(self.ID)
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.rowIDs = set(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.rowIDs = rows if rows 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.columnNeighbors = collections.defaultdict(dict)