Class ListOfOutputs<T>
Wraps another Outputs implementation and encodes one or more of its output values. You can use this when a single input may need to map to more than one output, maintaining order: pass the same input with a different output by calling Lucene.Net.Util.Fst.Builder<T>.Add(Lucene.Net.Util.Int32sRef, T) multiple times. The builder will then combine the outputs using the Lucene.Net.Util.Fst.Outputs<T>.Merge(T, T) method.
The resulting FST may not be minimal when an input has more than one output, as this requires pushing all multi-output values to a final state.
NOTE: the only way to create multiple outputs is to add the same input to the FST multiple times in a row. This is how the FST maps a single input to multiple outputs (e.g. you cannot pass a List<Object> to Lucene.Net.Util.Fst.Builder<T>.Add(Lucene.Net.Util.Int32sRef, T)). If your outputs are longs, and you need at most 2, then use UpToTwoPositiveInt64Outputs instead since it stores the outputs more compactly (by stealing a bit from each long value).
NOTE: this cannot wrap itself (ie you cannot make an FST with List<List<Object>> outputs using this).
Note
This API is experimental and might change in incompatible ways in the next release.
Inherited Members
Namespace: Lucene.Net.Util.Fst
Assembly: Lucene.Net.Misc.dll
Syntax
public sealed class ListOfOutputs<T> : Outputs<object>
Type Parameters
Name | Description |
---|---|
T |
Constructors
ListOfOutputs(Outputs<T>)
Wraps another Outputs implementation and encodes one or more of its output values. You can use this when a single input may need to map to more than one output, maintaining order: pass the same input with a different output by calling Lucene.Net.Util.Fst.Builder<T>.Add(Lucene.Net.Util.Int32sRef, T) multiple times. The builder will then combine the outputs using the Lucene.Net.Util.Fst.Outputs<T>.Merge(T, T) method.
The resulting FST may not be minimal when an input has more than one output, as this requires pushing all multi-output values to a final state.
NOTE: the only way to create multiple outputs is to add the same input to the FST multiple times in a row. This is how the FST maps a single input to multiple outputs (e.g. you cannot pass a List<Object> to Lucene.Net.Util.Fst.Builder<T>.Add(Lucene.Net.Util.Int32sRef, T)). If your outputs are longs, and you need at most 2, then use UpToTwoPositiveInt64Outputs instead since it stores the outputs more compactly (by stealing a bit from each long value).
NOTE: this cannot wrap itself (ie you cannot make an FST with List<List<Object>> outputs using this).
Note
This API is experimental and might change in incompatible ways in the next release.
Declaration
public ListOfOutputs(Outputs<T> outputs)
Parameters
Type | Name | Description |
---|---|---|
Outputs<T> | outputs |
Properties
NoOutput
NOTE: this output is compared with == so you must ensure that all methods return the single object if it's really no output
Declaration
public override object NoOutput { get; }
Property Value
Type | Description |
---|---|
object |
Overrides
Methods
Add(object, object)
Eg add("foo", "bar") -> "foobar"
Declaration
public override object Add(object prefix, object output)
Parameters
Type | Name | Description |
---|---|---|
object | prefix | |
object | output |
Returns
Type | Description |
---|---|
object |
Overrides
AsList(object)
Wraps another Outputs implementation and encodes one or more of its output values. You can use this when a single input may need to map to more than one output, maintaining order: pass the same input with a different output by calling Lucene.Net.Util.Fst.Builder<T>.Add(Lucene.Net.Util.Int32sRef, T) multiple times. The builder will then combine the outputs using the Lucene.Net.Util.Fst.Outputs<T>.Merge(T, T) method.
The resulting FST may not be minimal when an input has more than one output, as this requires pushing all multi-output values to a final state.
NOTE: the only way to create multiple outputs is to add the same input to the FST multiple times in a row. This is how the FST maps a single input to multiple outputs (e.g. you cannot pass a List<Object> to Lucene.Net.Util.Fst.Builder<T>.Add(Lucene.Net.Util.Int32sRef, T)). If your outputs are longs, and you need at most 2, then use UpToTwoPositiveInt64Outputs instead since it stores the outputs more compactly (by stealing a bit from each long value).
NOTE: this cannot wrap itself (ie you cannot make an FST with List<List<Object>> outputs using this).
Note
This API is experimental and might change in incompatible ways in the next release.
Declaration
public IList<T> AsList(object output)
Parameters
Type | Name | Description |
---|---|---|
object | output |
Returns
Type | Description |
---|---|
IList<T> |
Common(object, object)
Eg common("foobar", "food") -> "foo"
Declaration
public override object Common(object output1, object output2)
Parameters
Type | Name | Description |
---|---|---|
object | output1 | |
object | output2 |
Returns
Type | Description |
---|---|
object |
Overrides
Merge(object, object)
Wraps another Outputs implementation and encodes one or more of its output values. You can use this when a single input may need to map to more than one output, maintaining order: pass the same input with a different output by calling Lucene.Net.Util.Fst.Builder<T>.Add(Lucene.Net.Util.Int32sRef, T) multiple times. The builder will then combine the outputs using the Lucene.Net.Util.Fst.Outputs<T>.Merge(T, T) method.
The resulting FST may not be minimal when an input has more than one output, as this requires pushing all multi-output values to a final state.
NOTE: the only way to create multiple outputs is to add the same input to the FST multiple times in a row. This is how the FST maps a single input to multiple outputs (e.g. you cannot pass a List<Object> to Lucene.Net.Util.Fst.Builder<T>.Add(Lucene.Net.Util.Int32sRef, T)). If your outputs are longs, and you need at most 2, then use UpToTwoPositiveInt64Outputs instead since it stores the outputs more compactly (by stealing a bit from each long value).
NOTE: this cannot wrap itself (ie you cannot make an FST with List<List<Object>> outputs using this).
Note
This API is experimental and might change in incompatible ways in the next release.
Declaration
public override object Merge(object first, object second)
Parameters
Type | Name | Description |
---|---|---|
object | first | |
object | second |
Returns
Type | Description |
---|---|
object |
Overrides
OutputToString(object)
Wraps another Outputs implementation and encodes one or more of its output values. You can use this when a single input may need to map to more than one output, maintaining order: pass the same input with a different output by calling Lucene.Net.Util.Fst.Builder<T>.Add(Lucene.Net.Util.Int32sRef, T) multiple times. The builder will then combine the outputs using the Lucene.Net.Util.Fst.Outputs<T>.Merge(T, T) method.
The resulting FST may not be minimal when an input has more than one output, as this requires pushing all multi-output values to a final state.
NOTE: the only way to create multiple outputs is to add the same input to the FST multiple times in a row. This is how the FST maps a single input to multiple outputs (e.g. you cannot pass a List<Object> to Lucene.Net.Util.Fst.Builder<T>.Add(Lucene.Net.Util.Int32sRef, T)). If your outputs are longs, and you need at most 2, then use UpToTwoPositiveInt64Outputs instead since it stores the outputs more compactly (by stealing a bit from each long value).
NOTE: this cannot wrap itself (ie you cannot make an FST with List<List<Object>> outputs using this).
Note
This API is experimental and might change in incompatible ways in the next release.
Declaration
public override string OutputToString(object output)
Parameters
Type | Name | Description |
---|---|---|
object | output |
Returns
Type | Description |
---|---|
string |
Overrides
Read(DataInput)
Decode an output value previously written with Lucene.Net.Util.Fst.Outputs<T>.Write(T, Lucene.Net.Store.DataOutput).
Declaration
public override object Read(DataInput @in)
Parameters
Type | Name | Description |
---|---|---|
DataInput | in |
Returns
Type | Description |
---|---|
object |
Overrides
ReadFinalOutput(DataInput)
Decode an output value previously written with Lucene.Net.Util.Fst.Outputs<T>.WriteFinalOutput(T, Lucene.Net.Store.DataOutput). By default this just calls Lucene.Net.Util.Fst.Outputs<T>.Read(Lucene.Net.Store.DataInput).
Declaration
public override object ReadFinalOutput(DataInput @in)
Parameters
Type | Name | Description |
---|---|---|
DataInput | in |
Returns
Type | Description |
---|---|
object |
Overrides
Subtract(object, object)
Eg subtract("foobar", "foo") -> "bar"
Declaration
public override object Subtract(object @object, object inc)
Parameters
Type | Name | Description |
---|---|---|
object | object | |
object | inc |
Returns
Type | Description |
---|---|
object |
Overrides
ToString()
Returns a string that represents the current object.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string | A string that represents the current object. |
Overrides
Write(object, DataOutput)
Encode an output value into a Lucene.Net.Store.DataOutput.
Declaration
public override void Write(object output, DataOutput @out)
Parameters
Type | Name | Description |
---|---|---|
object | output | |
DataOutput | out |
Overrides
WriteFinalOutput(object, DataOutput)
Encode an final node output value into a Lucene.Net.Store.DataOutput. By default this just calls Lucene.Net.Util.Fst.Outputs<T>.Write(T, Lucene.Net.Store.DataOutput).
Declaration
public override void WriteFinalOutput(object output, DataOutput @out)
Parameters
Type | Name | Description |
---|---|---|
object | output | |
DataOutput | out |