Fork me on GitHub
  • API

    Show / Hide Table of Contents

    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.

    Inheritance
    object
    Outputs<object>
    ListOfOutputs<T>
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    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
    Lucene.Net.Util.Fst.Outputs<object>.NoOutput

    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
    Outputs<object>.Add(object, object)

    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
    Outputs<object>.Common(object, object)

    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
    Outputs<object>.Merge(object, object)

    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
    Outputs<object>.OutputToString(object)

    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
    Lucene.Net.Util.Fst.Outputs<object>.Read(Lucene.Net.Store.DataInput)

    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
    Lucene.Net.Util.Fst.Outputs<object>.ReadFinalOutput(Lucene.Net.Store.DataInput)

    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
    Outputs<object>.Subtract(object, object)

    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
    object.ToString()

    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
    Outputs<object>.Write(object, DataOutput)

    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
    Overrides
    Outputs<object>.WriteFinalOutput(object, DataOutput)
    Back to top Copyright © 2024 The Apache Software Foundation, Licensed under the Apache License, Version 2.0
    Apache Lucene.Net, Lucene.Net, Apache, the Apache feather logo, and the Apache Lucene.Net project logo are trademarks of The Apache Software Foundation.
    All other marks mentioned may be trademarks or registered trademarks of their respective owners.