You could use a shared reference between the view and the presenter to store the viewModel (as a data structure).
For example, using dependency injection:
Response perform(Request request) {
Refactoring: Change the code's structure without changing its external behavior
Invariants:
import random | |
alphabet = { | |
".-": "A", | |
"-...": "B", | |
"-.-.": "C", | |
"-..": "D", | |
".": "E", | |
"..-.": "F", |
# based on edx harvard cs50ai uncertainty lesson source code | |
from pgmpy.models import BayesianNetwork | |
from pgmpy.factors.discrete import ( | |
TabularCPD, | |
) | |
from pgmpy.inference import VariableElimination | |
model = BayesianNetwork( | |
[ |
import torch | |
from model import model | |
X = torch.tensor( | |
[ | |
[ | |
-1, | |
-1, | |
1, # delayed | |
-1, |