# Class ExitingVariableOp

Provides outgoing messages for ExitingVariable<T>(T, out T), given random arguments to the function.

**Namespace**: Microsoft.ML.Probabilistic.Factors

**Assembly**: Microsoft.ML.Probabilistic.dll

##### Syntax

`public static class ExitingVariableOp : object`

**Remarks**

This factor is like ReplicateWithMarginal<T>(T, Int32, out T) except `Uses[0]`

plays the role of `Def`

,
and `Def`

is considered a `Use`

. Needed only when a variable exits a gate in VMP.

### Methods

#### AverageLogFactor()

Evidence message for VMP.

##### Declaration

`public static double AverageLogFactor()`

##### Returns

Type | Description |
---|---|

Double | Zero. |

##### Remarks

The formula for the result is `log(factor(Use,Def,Marginal))`

. Adding up these values across all factors and variables gives the log-evidence estimate for VMP.

#### DefAverageLogarithm<T>(T)

VMP message to `Def`

.

##### Declaration

`public static T DefAverageLogarithm<T>(T Use)`

##### Parameters

Type | Name | Description |
---|---|---|

T | Use | Incoming message from |

##### Returns

Type | Description |
---|---|

T | The outgoing VMP message to the |

##### Type Parameters

Name | Description |
---|---|

T | The type of the messages. |

##### Remarks

The outgoing message is the factor viewed as a function of `Def`

with `Use`

integrated out. The formula is `sum_Use p(Use) factor(Use,Def,Marginal)`

.

#### MarginalAverageLogarithm<T>(T)

VMP message to `Marginal`

.

##### Declaration

`public static T MarginalAverageLogarithm<T>(T Use)`

##### Parameters

Type | Name | Description |
---|---|---|

T | Use | Incoming message from |

##### Returns

Type | Description |
---|---|

T | The outgoing VMP message to the |

##### Type Parameters

Name | Description |
---|---|

T | The type of the messages. |

##### Remarks

The outgoing message is the factor viewed as a function of `Marginal`

with `Use`

integrated out. The formula is `sum_Use p(Use) factor(Use,Def,Marginal)`

.

#### MarginalAverageLogarithmInit<T>(T)

##### Declaration

```
public static T MarginalAverageLogarithmInit<T>(T Def)
where T : ICloneable
```

##### Parameters

Type | Name | Description |
---|---|---|

T | Def | Incoming message from |

##### Returns

Type | Description |
---|---|

T |

##### Type Parameters

Name | Description |
---|---|

T | The type of the messages. |

##### Remarks

#### UseAverageLogarithm<T>(T)

VMP message to `Use`

.

##### Declaration

`public static T UseAverageLogarithm<T>(T Def)`

##### Parameters

Type | Name | Description |
---|---|---|

T | Def | Incoming message from |

##### Returns

Type | Description |
---|---|

T | The outgoing VMP message to the |

##### Type Parameters

Name | Description |
---|---|

T | The type of the messages. |

##### Remarks

The outgoing message is a distribution matching the moments of `Use`

as the random arguments are varied. The formula is `proj[sum_(Def) p(Def) factor(Use,Def,Marginal)]`

.