iopurpose.py 550 Bytes
Newer Older
Michele's avatar
Michele committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# Classes representing experts for input and output labels
from .basepurpose import Purpose

class InputPurpose(Purpose):

    def __init__(self, inputs):
        self._inputs = inputs.copy()

    # Given a trace returns the set of inputs enabled after it.
    def getEnabled(self, trace):
        return self._inputs

class OutputPurpose(Purpose):

    def __init__(self, outputs):
        self._outputs = outputs.copy()

    # Given a trace returns the set of outputs enabled after it.
    def getEnabled(self, trace):
        return self._outputs