Class Outputs<T>
Represents the outputs for an FST, providing the basic algebra required for building and traversing the FST.
Note that any operation that returns NO_OUTPUT must return the same singleton object from NoOutput.
LUCENENET IMPORTANT: If T
is a collection type,
it must implement IStructuralEquatable
in order to properly compare its nested values.
Note
This API is experimental and might change in incompatible ways in the next release.
Inheritance
Inherited Members
Namespace: Lucene.Net.Util.Fst
Assembly: Lucene.Net.dll
Syntax
public abstract class Outputs<T>
Type Parameters
Name | Description |
---|---|
T |
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 abstract T NoOutput { get; }
Property Value
Type | Description |
---|---|
T |
Methods
Add(T, T)
Eg add("foo", "bar") -> "foobar"
Declaration
public abstract T Add(T prefix, T output)
Parameters
Type | Name | Description |
---|---|---|
T | prefix | |
T | output |
Returns
Type | Description |
---|---|
T |
Common(T, T)
Eg common("foobar", "food") -> "foo"
Declaration
public abstract T Common(T output1, T output2)
Parameters
Type | Name | Description |
---|---|---|
T | output1 | |
T | output2 |
Returns
Type | Description |
---|---|
T |
Merge(T, T)
Represents the outputs for an FST, providing the basic algebra required for building and traversing the FST.
Note that any operation that returns NO_OUTPUT must return the same singleton object from NoOutput.
LUCENENET IMPORTANT: If T
is a collection type,
it must implement IStructuralEquatable
in order to properly compare its nested values.
Note
This API is experimental and might change in incompatible ways in the next release.
Declaration
public virtual T Merge(T first, T second)
Parameters
Type | Name | Description |
---|---|---|
T | first | |
T | second |
Returns
Type | Description |
---|---|
T |
OutputToString(T)
Represents the outputs for an FST, providing the basic algebra required for building and traversing the FST.
Note that any operation that returns NO_OUTPUT must return the same singleton object from NoOutput.
LUCENENET IMPORTANT: If T
is a collection type,
it must implement IStructuralEquatable
in order to properly compare its nested values.
Note
This API is experimental and might change in incompatible ways in the next release.
Declaration
public abstract string OutputToString(T output)
Parameters
Type | Name | Description |
---|---|---|
T | output |
Returns
Type | Description |
---|---|
string |
Read(DataInput)
Decode an output value previously written with Write(T, DataOutput).
Declaration
public abstract T Read(DataInput @in)
Parameters
Type | Name | Description |
---|---|---|
DataInput | in |
Returns
Type | Description |
---|---|
T |
ReadFinalOutput(DataInput)
Decode an output value previously written with WriteFinalOutput(T, DataOutput). By default this just calls Read(DataInput).
Declaration
public virtual T ReadFinalOutput(DataInput @in)
Parameters
Type | Name | Description |
---|---|---|
DataInput | in |
Returns
Type | Description |
---|---|
T |
Subtract(T, T)
Eg subtract("foobar", "foo") -> "bar"
Declaration
public abstract T Subtract(T output, T inc)
Parameters
Type | Name | Description |
---|---|---|
T | output | |
T | inc |
Returns
Type | Description |
---|---|
T |
Write(T, DataOutput)
Encode an output value into a DataOutput.
Declaration
public abstract void Write(T output, DataOutput @out)
Parameters
Type | Name | Description |
---|---|---|
T | output | |
DataOutput | out |
WriteFinalOutput(T, DataOutput)
Encode an final node output value into a DataOutput. By default this just calls Write(T, DataOutput).
Declaration
public virtual void WriteFinalOutput(T output, DataOutput @out)
Parameters
Type | Name | Description |
---|---|---|
T | output | |
DataOutput | out |