Class NativeHashMapExtensions | Collections | 0.8.0-preview.5
docs.unity.cn
    Show / Hide Table of Contents

    Class NativeHashMapExtensions

    Inheritance
    Object
    NativeHashMapExtensions
    Namespace: Unity.Collections
    Syntax
    public static class NativeHashMapExtensions

    Methods

    GetBucketData<TKey, TValue>(NativeHashMap<TKey, TValue>)

    Returns internal bucked data structure. Internal bucket structure is useful when creating custom jobs operating on container. Each bucket can be processed concurrently with other buckets, and all key/value pairs in each bucket must processed individually (in sequential order) by a single thread.

    Declaration
    public static UnsafeHashMapBucketData GetBucketData<TKey, TValue>(this NativeHashMap<TKey, TValue> hashMap)
        where TKey : struct, IEquatable<TKey> where TValue : struct
    Parameters
    Type Name Description
    NativeHashMap<TKey, TValue> hashMap
    Returns
    Type Description
    UnsafeHashMapBucketData

    Returns internal bucked data structure.

    Type Parameters
    Name Description
    TKey

    The type of the keys in the container.

    TValue

    The type of the values in the container.

    GetUniqueKeyArray<TKey, TValue>(NativeMultiHashMap<TKey, TValue>, Allocator)

    Declaration
    public static (NativeArray<TKey>, int)GetUniqueKeyArray<TKey, TValue>(this NativeMultiHashMap<TKey, TValue> hashMap, Allocator allocator)
        where TKey : struct, IEquatable<TKey>, IComparable<TKey> where TValue : struct
    Parameters
    Type Name Description
    NativeMultiHashMap<TKey, TValue> hashMap
    Allocator allocator
    Returns
    Type Description
    ValueTuple<NativeArray<TKey>, Int32>
    Type Parameters
    Name Description
    TKey

    The type of the keys in the container.

    TValue

    The type of the values in the container.

    GetUnsafeBucketData<TKey, TValue>(NativeMultiHashMap<TKey, TValue>)

    Returns internal bucked data structure. Internal bucket structure is useful when creating custom jobs operating on container. Each bucket can be processed concurrently with other buckets, and all key/value pairs in each bucket must processed individually (in sequential order) by a single thread.

    Declaration
    public static UnsafeHashMapBucketData GetUnsafeBucketData<TKey, TValue>(this NativeMultiHashMap<TKey, TValue> multiHashMap)
        where TKey : struct, IEquatable<TKey> where TValue : struct
    Parameters
    Type Name Description
    NativeMultiHashMap<TKey, TValue> multiHashMap
    Returns
    Type Description
    UnsafeHashMapBucketData

    Returns internal bucked data structure.

    Type Parameters
    Name Description
    TKey

    The type of the keys in the container.

    TValue

    The type of the values in the container.

    Unique<T>(NativeArray<T>)

    Declaration
    public static int Unique<T>(this NativeArray<T> array)
        where T : struct, IEquatable<T>
    Parameters
    Type Name Description
    NativeArray<T> array
    Returns
    Type Description
    Int32
    Type Parameters
    Name Description
    T
    Back to top Copyright © 2020 Unity Technologies
    Generated by DocFX