You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In many format file it is written which kind of Factor is stored. Yet we use this information to read the file with the correct parsers but we delegate to the developer to guess the type.
It would be useful to have a way to find the type of factors without using instanceof or assuming that the final users are nice people that never make mistakes...
The text was updated successfully, but these errors were encountered:
First, there is no need for casting anything since the UAIParser.read(String) method is already generic. The return type is controlled by the assigned variable type. And this is the issue.
Both of these statements are valid but the second one will generate an error since it will read a BayesianFactor (as indicated in the bayesian.uai file) but then it will be assigned to a VertexFactor.
In many format file it is written which kind of Factor is stored. Yet we use this information to read the file with the correct parsers but we delegate to the developer to guess the type.
It would be useful to have a way to find the type of factors without using
instanceof
or assuming that the final users are nice people that never make mistakes...The text was updated successfully, but these errors were encountered: