Method GetByOutput
GetByOutput(FST<Nullable<Int64>>, Int64)
Reverse lookup (lookup by output instead of by input),
in the special case when your FSTs outputs are
strictly ascending. This locates the input/output
pair where the output is equal to the target, and will
return null
if that output does not exist.
NOTE: this only works with , only
works when the outputs are ascending in order with
the inputs.
For example, simple ordinals (0, 1,
2, ...), or file offets (when appending to a file)
fit this.
Declaration
public static Int32sRef GetByOutput(FST<long?> fst, long targetOutput)
Parameters
Type |
Name |
Description |
FST<System.Nullable<System.Int64>> |
fst |
|
System.Int64 |
targetOutput |
|
Returns
GetByOutput(FST<Nullable<Int64>>, Int64, FST.BytesReader, FST.Arc<Nullable<Int64>>, FST.Arc<Nullable<Int64>>, Int32sRef)
Declaration
public static Int32sRef GetByOutput(FST<long?> fst, long targetOutput, FST.BytesReader in, FST.Arc<long?> arc, FST.Arc<long?> scratchArc, Int32sRef result)
Parameters
Type |
Name |
Description |
FST<System.Nullable<System.Int64>> |
fst |
|
System.Int64 |
targetOutput |
|
FST.BytesReader |
in |
|
FST.Arc<System.Nullable<System.Int64>> |
arc |
|
FST.Arc<System.Nullable<System.Int64>> |
scratchArc |
|
Int32sRef |
result |
|
Returns