Open hsadeghidw opened 3 years ago
Do we also want to negate cases? Something like dqm.fix_variable_case('a', 4, 0)
The case value of a variable is a property of the SampleSet
. It may be interesting to be able to change variable case in a sampleset and observe the modified energy.
I am not sure I understand what you mean?
okay, I guess I didn't understand what you meant by negating cases. Would dqm.fix_variable_case('a', 4, 0)
remove case 4? and therefore reduce the dqm.num_cases('a') by one?
If so, this would be useful. We can even do dqm.fix_variable({'a': [1, 3,4]})
to only keep the three cases [1,3,4]. Or equally, dqm.fix_variable_case('a', {0: 0, 2: 0})
However, I think from user's point of view, this can be confusing because we are not tracking cases by the label.
Yeah, I was thinking about it more and upon reflection I think a separate method like dqm.exclude_case('a', 0)
would be a lot clearer. Rather than making is a switching behavior in dqm.fix_variable
.
Given a variable, fix the value of the variable to one of its cases and remove the variable.