Class MutableContext

Namespace
NOpenNLP.Tools.Ml.Model
Assembly
NOpenNLP.Tools.dll

Class used to store parameters or expected values associated with this context which can be updated or assigned.

public class MutableContext : Context
Inheritance
MutableContext
Inherited Members

Constructors

MutableContext(int[], double[])

Creates a new parameters object with the specified parameters associated with the specified outcome pattern.

public MutableContext(int[] outcomePattern, double[] parameters)

Parameters

outcomePattern int[]

Array of outcomes for which parameters exists for this context.

parameters double[]

Parameters for the outcomes specified.

Methods

Contains(int)

public virtual bool Contains(int outcome)

Parameters

outcome int

Returns

bool

SetParameter(int, double)

Assigns the parameter or expected value at the specified outcomeIndex the specified value.

public virtual void SetParameter(int outcomeIndex, double value)

Parameters

outcomeIndex int

The index of the parameter or expected value to be updated.

value double

The value to be assigned.

UpdateParameter(int, double)

Updated the parameter or expected value at the specified outcomeIndex by adding the specified value to its current value.

public virtual void UpdateParameter(int outcomeIndex, double value)

Parameters

outcomeIndex int

The index of the parameter or expected value to be updated.

value double

The value to be added.