Class UpToTwoPositiveInt64Outputs
An FST Lucene.Net.Util.Fst.Outputs<T> implementation where each output is one or two non-negative long values. If it's a float output, Nullable<T> is returned; else, UpToTwoPositiveInt64Outputs.TwoInt64s. Order is preserved in the UpToTwoPositiveInt64Outputs.TwoInt64s case, ie .first is the first input/output added to Lucene.Net.Util.Fst.Builder<T>, and .second is the second. You cannot store 0 output with this (that's reserved to mean "no output")!
NOTE: the only way to create a TwoLongs output is to add the same input to the FST twice in a row. This is how the FST maps a single input to two outputs (e.g. you cannot pass a UpToTwoPositiveInt64Outputs.TwoInt64s to Lucene.Net.Util.Fst.Builder<T>.Add(Lucene.Net.Util.Int32sRef, T). If you need more than two then use ListOfOutputs<T>, but if you only have at most 2 then this implementation will require fewer bytes as it steals one bit from each long value.
NOTE: the resulting FST is not guaranteed to be minimal! See Lucene.Net.Util.Fst.Builder<T>.
NOTE: This was UpToTwoPositiveIntOutputs in Lucene - the data type (int) was wrong there - it should have been long
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 UpToTwoPositiveInt64Outputs : Outputs<object>
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
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
Get(long)
An FST Lucene.Net.Util.Fst.Outputs<T> implementation where each output is one or two non-negative long values. If it's a float output, Nullable<T> is returned; else, UpToTwoPositiveInt64Outputs.TwoInt64s. Order is preserved in the UpToTwoPositiveInt64Outputs.TwoInt64s case, ie .first is the first input/output added to Lucene.Net.Util.Fst.Builder<T>, and .second is the second. You cannot store 0 output with this (that's reserved to mean "no output")!
NOTE: the only way to create a TwoLongs output is to add the same input to the FST twice in a row. This is how the FST maps a single input to two outputs (e.g. you cannot pass a UpToTwoPositiveInt64Outputs.TwoInt64s to Lucene.Net.Util.Fst.Builder<T>.Add(Lucene.Net.Util.Int32sRef, T). If you need more than two then use ListOfOutputs<T>, but if you only have at most 2 then this implementation will require fewer bytes as it steals one bit from each long value.
NOTE: the resulting FST is not guaranteed to be minimal! See Lucene.Net.Util.Fst.Builder<T>.
NOTE: This was UpToTwoPositiveIntOutputs in Lucene - the data type (int) was wrong there - it should have been long
Note
This API is experimental and might change in incompatible ways in the next release.
Declaration
public Int64 Get(long v)
Parameters
Type | Name | Description |
---|---|---|
long | v |
Returns
Type | Description |
---|---|
Int64 |
Get(long, long)
An FST Lucene.Net.Util.Fst.Outputs<T> implementation where each output is one or two non-negative long values. If it's a float output, Nullable<T> is returned; else, UpToTwoPositiveInt64Outputs.TwoInt64s. Order is preserved in the UpToTwoPositiveInt64Outputs.TwoInt64s case, ie .first is the first input/output added to Lucene.Net.Util.Fst.Builder<T>, and .second is the second. You cannot store 0 output with this (that's reserved to mean "no output")!
NOTE: the only way to create a TwoLongs output is to add the same input to the FST twice in a row. This is how the FST maps a single input to two outputs (e.g. you cannot pass a UpToTwoPositiveInt64Outputs.TwoInt64s to Lucene.Net.Util.Fst.Builder<T>.Add(Lucene.Net.Util.Int32sRef, T). If you need more than two then use ListOfOutputs<T>, but if you only have at most 2 then this implementation will require fewer bytes as it steals one bit from each long value.
NOTE: the resulting FST is not guaranteed to be minimal! See Lucene.Net.Util.Fst.Builder<T>.
NOTE: This was UpToTwoPositiveIntOutputs in Lucene - the data type (int) was wrong there - it should have been long
Note
This API is experimental and might change in incompatible ways in the next release.
Declaration
public UpToTwoPositiveInt64Outputs.TwoInt64s Get(long first, long second)
Parameters
Type | Name | Description |
---|---|---|
long | first | |
long | second |
Returns
Type | Description |
---|---|
UpToTwoPositiveInt64Outputs.TwoInt64s |
GetSingleton(bool)
An FST Lucene.Net.Util.Fst.Outputs<T> implementation where each output is one or two non-negative long values. If it's a float output, Nullable<T> is returned; else, UpToTwoPositiveInt64Outputs.TwoInt64s. Order is preserved in the UpToTwoPositiveInt64Outputs.TwoInt64s case, ie .first is the first input/output added to Lucene.Net.Util.Fst.Builder<T>, and .second is the second. You cannot store 0 output with this (that's reserved to mean "no output")!
NOTE: the only way to create a TwoLongs output is to add the same input to the FST twice in a row. This is how the FST maps a single input to two outputs (e.g. you cannot pass a UpToTwoPositiveInt64Outputs.TwoInt64s to Lucene.Net.Util.Fst.Builder<T>.Add(Lucene.Net.Util.Int32sRef, T). If you need more than two then use ListOfOutputs<T>, but if you only have at most 2 then this implementation will require fewer bytes as it steals one bit from each long value.
NOTE: the resulting FST is not guaranteed to be minimal! See Lucene.Net.Util.Fst.Builder<T>.
NOTE: This was UpToTwoPositiveIntOutputs in Lucene - the data type (int) was wrong there - it should have been long
Note
This API is experimental and might change in incompatible ways in the next release.
Declaration
public static UpToTwoPositiveInt64Outputs GetSingleton(bool doShare)
Parameters
Type | Name | Description |
---|---|---|
bool | doShare |
Returns
Type | Description |
---|---|
UpToTwoPositiveInt64Outputs |
Merge(object, object)
An FST Lucene.Net.Util.Fst.Outputs<T> implementation where each output is one or two non-negative long values. If it's a float output, Nullable<T> is returned; else, UpToTwoPositiveInt64Outputs.TwoInt64s. Order is preserved in the UpToTwoPositiveInt64Outputs.TwoInt64s case, ie .first is the first input/output added to Lucene.Net.Util.Fst.Builder<T>, and .second is the second. You cannot store 0 output with this (that's reserved to mean "no output")!
NOTE: the only way to create a TwoLongs output is to add the same input to the FST twice in a row. This is how the FST maps a single input to two outputs (e.g. you cannot pass a UpToTwoPositiveInt64Outputs.TwoInt64s to Lucene.Net.Util.Fst.Builder<T>.Add(Lucene.Net.Util.Int32sRef, T). If you need more than two then use ListOfOutputs<T>, but if you only have at most 2 then this implementation will require fewer bytes as it steals one bit from each long value.
NOTE: the resulting FST is not guaranteed to be minimal! See Lucene.Net.Util.Fst.Builder<T>.
NOTE: This was UpToTwoPositiveIntOutputs in Lucene - the data type (int) was wrong there - it should have been long
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)
An FST Lucene.Net.Util.Fst.Outputs<T> implementation where each output is one or two non-negative long values. If it's a float output, Nullable<T> is returned; else, UpToTwoPositiveInt64Outputs.TwoInt64s. Order is preserved in the UpToTwoPositiveInt64Outputs.TwoInt64s case, ie .first is the first input/output added to Lucene.Net.Util.Fst.Builder<T>, and .second is the second. You cannot store 0 output with this (that's reserved to mean "no output")!
NOTE: the only way to create a TwoLongs output is to add the same input to the FST twice in a row. This is how the FST maps a single input to two outputs (e.g. you cannot pass a UpToTwoPositiveInt64Outputs.TwoInt64s to Lucene.Net.Util.Fst.Builder<T>.Add(Lucene.Net.Util.Int32sRef, T). If you need more than two then use ListOfOutputs<T>, but if you only have at most 2 then this implementation will require fewer bytes as it steals one bit from each long value.
NOTE: the resulting FST is not guaranteed to be minimal! See Lucene.Net.Util.Fst.Builder<T>.
NOTE: This was UpToTwoPositiveIntOutputs in Lucene - the data type (int) was wrong there - it should have been long
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
Subtract(object, object)
Eg subtract("foobar", "foo") -> "bar"
Declaration
public override object Subtract(object output, object inc)
Parameters
Type | Name | Description |
---|---|---|
object | output | |
object | inc |
Returns
Type | Description |
---|---|
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 |