def _load_partial_samples(self, cls_name, samples_idxs, mover_idx):
        cls = self.class_list[cls_name]
        obj = cls.__new__(cls)
        PathMoveChange.__init__(obj, mover=self.storage.pathmovers[int(mover_idx)])

        if len(samples_idxs) > 0:
            obj.samples = [ self.storage.samples[int(idx)] for idx in samples_idxs ]

        return obj
    def _load(self, idx):
        cls_name = self.vars['cls'][idx]

        cls = self.class_list[cls_name]
        obj = cls.__new__(cls)
        PathMoveChange.__init__(obj, mover=self.vars['mover'][idx])

        obj.samples = self.vars['samples'][idx]
        obj.subchanges = self.vars['subchanges'][idx]

        obj.details = LoaderProxy(self.storage.details, int(self.variables['details'][idx]))

        return obj
Example #3
0
    def _load(self, idx):
        cls_name = self.vars['cls'][idx]

        cls = self.class_list[cls_name]
        obj = cls.__new__(cls)
        PathMoveChange.__init__(obj, mover=self.vars['mover'][idx])

        obj.samples = self.vars['samples'][idx]
        obj.subchanges = self.vars['subchanges'][idx]

        obj.details = LoaderProxy(self.storage.details,
                                  int(self.variables['details'][idx]))

        return obj
Example #4
0
    def _load_partial_samples(self, cls_name, samples_idxs, mover_idx,
                              details_idx):
        cls = self.class_list[cls_name]
        obj = cls.__new__(cls)
        PathMoveChange.__init__(obj,
                                mover=self.storage.pathmovers[int(mover_idx)])

        if len(samples_idxs) > 0:
            obj.samples = [
                self.storage.samples[int(idx)] for idx in samples_idxs
            ]

        obj.details = LoaderProxy(self.storage.details, int(details_idx))

        return obj