docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Interface IRangeGenerator

    Generates a sequence of Ranges.

    Namespace: Unity.InferenceEngine.Tokenization.Truncators
    Assembly: Unity.InferenceEngine.Tokenization.dll
    Syntax
    public interface IRangeGenerator

    Methods

    GetRanges(int, int, int, Output<Range>)

    Generates a sequence of chunks based on the length of the source, the maximum size of those chunks, and a stride.

    Declaration
    int GetRanges(int length, int rangeMaxLength, int stride, Output<Range> output)
    Parameters
    Type Name Description
    int length

    The length of the source.

    int rangeMaxLength

    The maximum size of the resulting chunks.

    int stride

    The stride controls how the generator goes along the length of the source.

    Output<Range> output

    The sequence of chunks, each represented by a Range.

    Returns
    Type Description
    int

    The number of ranges generated.

    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)