Пример #1
0
 def add_primitive_interaction(self, experiment, result, valence):
     label = experiment.get_label() + result.get_label()
     if label not in self.INTERACTIONS:
         interaction = Interaction(label, valence)
         interaction.set_experiment(experiment)
         interaction.set_result(result)
         interaction.set_valence(valence)
         self.INTERACTIONS[label] = interaction
Пример #2
0
 def add_primitive_interaction(self, experiment, result, valence):
     label = experiment.get_label() + result.get_label()
     if label not in self.INTERACTIONS:
         interaction = Interaction(label, valence)
         interaction.set_experiment(experiment)
         interaction.set_result(result)
         interaction.set_valence(valence)
         self.INTERACTIONS[label] = interaction
Пример #3
0
 def addget_primitive_interaction(self,
                                  experiment,
                                  result,
                                  valence=None,
                                  meaning=None):
     label = experiment.get_label() + result.get_label()
     if label not in self.INTERACTIONS:
         interaction = Interaction(label)
         interaction.set_experiment(experiment)
         interaction.set_result(result)
         interaction.set_valence(valence)
         interaction.set_meaning(meaning)
         self.INTERACTIONS[label] = interaction
     return self.INTERACTIONS[label]
Пример #4
0
 def addget_primitive_interaction(self, experiment, result, valence=None, meaning=None):
     """
     If a primitive interaction is not in the INTERACTIONS dictionary, add it. Otherwise just return it.
     :param experiment: (str) primitive experiment
     :param result: (str) primitive result
     :param valence: (int) valence of the interaction
     :param meaning: (str) observer's meaning of the interaction
     :return: (interaction) primitive interaction from the INTERACTIONS dictionary
     """
     label = experiment.get_label() + result.get_label()
     if label not in self.INTERACTIONS:
         interaction = Interaction(label)
         interaction.set_experiment(experiment)
         interaction.set_result(result)
         interaction.set_valence(valence)
         interaction.set_meaning(meaning)
         self.INTERACTIONS[label] = interaction
     return self.INTERACTIONS[label]
Пример #5
0
 def addget_primitive_interaction(self,
                                  experiment,
                                  result,
                                  valence=None,
                                  meaning=None):
     """
     If a primitive interaction is not in the INTERACTIONS dictionary, add it. Otherwise just return it.
     :param experiment: (str) primitive experiment
     :param result: (str) primitive result
     :param valence: (int) valence of the interaction
     :param meaning: (str) observer's meaning of the interaction
     :return: (interaction) primitive interaction from the INTERACTIONS dictionary
     """
     label = experiment.get_label() + result.get_label()
     if label not in self.INTERACTIONS:
         interaction = Interaction(label)
         interaction.set_experiment(experiment)
         interaction.set_result(result)
         interaction.set_valence(valence)
         interaction.set_meaning(meaning)
         self.INTERACTIONS[label] = interaction
     return self.INTERACTIONS[label]