Class StringFormatOpBase<TThis>
A base class for implementations of message passing operations for various forms of the string formatting factor.
Inheritance
StringFormatOpBase<TThis>
Inherited Members
Namespace: Microsoft.ML.Probabilistic.Factors
Assembly: Microsoft.ML.Probabilistic.dll
Syntax
[Quality(QualityBand.Experimental)]
[Buffers(new string[]{"toStrReverseMessage"})]
public class StringFormatOpBase<TThis>
where TThis : StringFormatOpBase<TThis>, new()
Type Parameters
Name | Description |
---|---|
TThis | The type of actual class implementing the operation. |
Remarks
We need this class to be generic so that for different TThis
we have different sets of fields.
Properties
RequirePlaceholderForEveryArgument
Gets or sets a value indicating whether a format string must have all arguments present.
Declaration
protected static bool RequirePlaceholderForEveryArgument { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
Remarks
Derived classes are expected to initialize the value of this property in their static constructors.
Methods
ArgsAverageConditional<TStringDistributionList>(StringDistribution, StringDistribution, IReadOnlyList<StringDistribution>, IReadOnlyList<String>, TStringDistributionList)
Declaration
public static TStringDistributionList ArgsAverageConditional<TStringDistributionList>(StringDistribution str, StringDistribution format, IReadOnlyList<StringDistribution> args, IReadOnlyList<string> argNames, TStringDistributionList result)
where TStringDistributionList : class, IList<StringDistribution>
Parameters
Type | Name | Description |
---|---|---|
StringDistribution | str | |
StringDistribution | format | |
IReadOnlyList<StringDistribution> | args | |
IReadOnlyList<String> | argNames | |
TStringDistributionList | result |
Returns
Type | Description |
---|---|
TStringDistributionList |
Type Parameters
Name | Description |
---|---|
TStringDistributionList |
ArgsAverageConditionalBuffered<TStringDistributionList>(StringDistribution, StringDistribution, IReadOnlyList<StringDistribution>, TStringDistributionList)
Declaration
public static TStringDistributionList ArgsAverageConditionalBuffered<TStringDistributionList>(StringDistribution str, StringDistribution toStrReverseMessage, IReadOnlyList<StringDistribution> args, TStringDistributionList result)
where TStringDistributionList : class, IList<StringDistribution>
Parameters
Type | Name | Description |
---|---|---|
StringDistribution | str | |
StringDistribution | toStrReverseMessage | |
IReadOnlyList<StringDistribution> | args | |
TStringDistributionList | result |
Returns
Type | Description |
---|---|
TStringDistributionList |
Type Parameters
Name | Description |
---|---|
TStringDistributionList |
ArgsAverageConditionalBufferedWithNulls<TStringDistributionList>(StringDistribution, StringDistribution, IReadOnlyList<StringDistribution>, TStringDistributionList)
Declaration
public static TStringDistributionList ArgsAverageConditionalBufferedWithNulls<TStringDistributionList>(StringDistribution str, StringDistribution toStrReverseMessage, IReadOnlyList<StringDistribution> args, TStringDistributionList result)
where TStringDistributionList : class, IList<StringDistribution>
Parameters
Type | Name | Description |
---|---|---|
StringDistribution | str | |
StringDistribution | toStrReverseMessage | |
IReadOnlyList<StringDistribution> | args | |
TStringDistributionList | result |
Returns
Type | Description |
---|---|
TStringDistributionList |
Type Parameters
Name | Description |
---|---|
TStringDistributionList |
ComputeToStrReverseMessage(StringDistribution, IEnumerable<StringDistribution>, IReadOnlyList<String>, Boolean)
Declaration
public static StringDistribution ComputeToStrReverseMessage(StringDistribution format, IEnumerable<StringDistribution> args, IReadOnlyList<string> argNames, bool makeEpsilonFree)
Parameters
Type | Name | Description |
---|---|---|
StringDistribution | format | |
IEnumerable<StringDistribution> | args | |
IReadOnlyList<String> | argNames | |
Boolean | makeEpsilonFree |
Returns
Type | Description |
---|---|
StringDistribution |
FormatAverageConditional(StringDistribution, IReadOnlyList<StringDistribution>, IReadOnlyList<String>)
Declaration
public static StringDistribution FormatAverageConditional(StringDistribution str, IReadOnlyList<StringDistribution> args, IReadOnlyList<string> argNames)
Parameters
Type | Name | Description |
---|---|---|
StringDistribution | str | |
IReadOnlyList<StringDistribution> | args | |
IReadOnlyList<String> | argNames |
Returns
Type | Description |
---|---|
StringDistribution |
FormatAverageConditional(StringDistribution, IReadOnlyList<String>, IReadOnlyList<String>)
Declaration
public static StringDistribution FormatAverageConditional(StringDistribution str, IReadOnlyList<string> args, IReadOnlyList<string> argNames)
Parameters
Type | Name | Description |
---|---|---|
StringDistribution | str | |
IReadOnlyList<String> | args | |
IReadOnlyList<String> | argNames |
Returns
Type | Description |
---|---|
StringDistribution |
LogEvidenceRatio(StringDistribution)
Declaration
public static double LogEvidenceRatio(StringDistribution str)
Parameters
Type | Name | Description |
---|---|---|
StringDistribution | str |
Returns
Type | Description |
---|---|
Double |
LogEvidenceRatio(String, StringDistribution, IReadOnlyList<StringDistribution>, IReadOnlyList<String>)
Declaration
public static double LogEvidenceRatio(string str, StringDistribution format, IReadOnlyList<StringDistribution> args, IReadOnlyList<string> argNames)
Parameters
Type | Name | Description |
---|---|---|
String | str | |
StringDistribution | format | |
IReadOnlyList<StringDistribution> | args | |
IReadOnlyList<String> | argNames |
Returns
Type | Description |
---|---|
Double |
LogEvidenceRatio(String, StringDistribution, IReadOnlyList<String>, IReadOnlyList<String>)
Declaration
public static double LogEvidenceRatio(string str, StringDistribution format, IReadOnlyList<string> args, IReadOnlyList<string> argNames)
Parameters
Type | Name | Description |
---|---|---|
String | str | |
StringDistribution | format | |
IReadOnlyList<String> | args | |
IReadOnlyList<String> | argNames |
Returns
Type | Description |
---|---|
Double |
StrAverageConditional(StringDistribution, IReadOnlyList<StringDistribution>, IReadOnlyList<String>)
Declaration
public static StringDistribution StrAverageConditional(StringDistribution format, IReadOnlyList<StringDistribution> args, IReadOnlyList<string> argNames)
Parameters
Type | Name | Description |
---|---|---|
StringDistribution | format | |
IReadOnlyList<StringDistribution> | args | |
IReadOnlyList<String> | argNames |
Returns
Type | Description |
---|---|
StringDistribution |
StrAverageConditional(StringDistribution, IReadOnlyList<String>, IReadOnlyList<String>)
Declaration
public static StringDistribution StrAverageConditional(StringDistribution format, IReadOnlyList<string> args, IReadOnlyList<string> argNames)
Parameters
Type | Name | Description |
---|---|---|
StringDistribution | format | |
IReadOnlyList<String> | args | |
IReadOnlyList<String> | argNames |
Returns
Type | Description |
---|---|
StringDistribution |
StrAverageConditional_NoValidation(StringDistribution, IReadOnlyList<StringDistribution>, IReadOnlyList<String>)
Declaration
public static StringDistribution StrAverageConditional_NoValidation(StringDistribution format, IReadOnlyList<StringDistribution> args, IReadOnlyList<string> argNames)
Parameters
Type | Name | Description |
---|---|---|
StringDistribution | format | |
IReadOnlyList<StringDistribution> | args | |
IReadOnlyList<String> | argNames |
Returns
Type | Description |
---|---|
StringDistribution |
ToStrReverseMessage(StringDistribution, IEnumerable<StringDistribution>, IReadOnlyList<String>)
Declaration
public static StringDistribution ToStrReverseMessage(StringDistribution format, IEnumerable<StringDistribution> args, IReadOnlyList<string> argNames)
Parameters
Type | Name | Description |
---|---|---|
StringDistribution | format | |
IEnumerable<StringDistribution> | args | |
IReadOnlyList<String> | argNames |
Returns
Type | Description |
---|---|
StringDistribution |