The following code is working for chance node but not working for Value Node
error:
foreach (int handle in net)
{
String[] outcomeIds = net.GetOutcomeIds(handle);
}
Could you tell me why or is there other method I can use?
GetOutcomeIds(handle) does not work for value node
GetOutcomeIds(handle) does not work for value node
- Attachments
-
- error message
- errormsg.GIF (13.04 KiB) Viewed 7367 times
-
- Site Admin
- Posts: 1417
- Joined: Mon Nov 26, 2007 5:51 pm
Re: GetOutcomeIds(handle) does not work for value node
That's by design - the value nodes don't have outcomes. What are you trying to do?
value node
We have several Chance nodes and Value nodes.
We need to get the value of Value Node
We need to get the value of Value Node
Also, we need to read BN file and get all of those nodes(Chance, Value),
how to identify or distinguish change node and value before the method of
GetOutcomeIds?
If it is Chance node then
use GetOutcomeIds
else
use other method
foreach (int handle in net)
{
String[] outcomeIds = net.GetOutcomeIds(handle);
}
how to identify or distinguish change node and value before the method of
GetOutcomeIds?
If it is Chance node then
use GetOutcomeIds
else
use other method
foreach (int handle in net)
{
String[] outcomeIds = net.GetOutcomeIds(handle);
}
-
- Site Admin
- Posts: 1417
- Joined: Mon Nov 26, 2007 5:51 pm
-
- Site Admin
- Posts: 1417
- Joined: Mon Nov 26, 2007 5:51 pm
-
- Site Admin
- Posts: 1417
- Joined: Mon Nov 26, 2007 5:51 pm