test.updated.bn {bnstruct} | R Documentation

## check if an updated `BN` is present in an `InferenceEngine`.

### Description

Check if an InferenceEngine actually contains an updated network, in order to provide the chance of a fallback and use the original network if no belief propagation has been performed.

### Usage

    test.updated.bn(x)

    ## S4 method for signature 'InferenceEngine'
    test.updated.bn(x)

### Arguments

`x` | an `InferenceEngine`.

### Value

`TRUE` if an updated network is contained in the InferenceEngine, `FALSE` otherwise.

### Examples

    ## Not run:
    dataset <- BNDataset("file.header", "file.data")
    bn <- BN(dataset)
    ie <- InferenceEngine(bn)
    test.updated.bn(ie) # FALSE

    observations(ie) <- list("observed.vars"=("A","G","X"), "observed.vals"=c(1,2,1))
    ie <- belief.propagation(ie)
    test.updated.bn(ie) # TRUE

    ## End(Not run)

[Package bnstruct version 1.0.6 Index]