Files
Misaki.HighPerformance/docfx/_site/api/Misaki.HighPerformance.LowLevel.Collections.UnsafeMultiHashMap-2.html

1019 lines
35 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Struct UnsafeMultiHashMap&lt;TKey, TValue&gt; | Misaki.HighPerformance </title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="title" content="Struct UnsafeMultiHashMap&lt;TKey, TValue&gt; | Misaki.HighPerformance ">
<link rel="icon" href="../favicon.ico">
<link rel="stylesheet" href="../public/docfx.min.css">
<link rel="stylesheet" href="../public/main.css">
<meta name="docfx:navrel" content="../toc.html">
<meta name="docfx:tocrel" content="toc.html">
<meta name="docfx:rel" content="../">
<meta name="loc:inThisArticle" content="In this article">
<meta name="loc:searchResultsCount" content="{count} results for &quot;{query}&quot;">
<meta name="loc:searchNoResults" content="No results for &quot;{query}&quot;">
<meta name="loc:tocFilter" content="Filter by title">
<meta name="loc:nextArticle" content="Next">
<meta name="loc:prevArticle" content="Previous">
<meta name="loc:themeLight" content="Light">
<meta name="loc:themeDark" content="Dark">
<meta name="loc:themeAuto" content="Auto">
<meta name="loc:changeTheme" content="Change theme">
<meta name="loc:copy" content="Copy">
<meta name="loc:downloadPdf" content="Download PDF">
<script type="module" src="./../public/docfx.min.js"></script>
<script>
const theme = localStorage.getItem('theme') || 'auto'
document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
</script>
</head>
<body class="tex2jax_ignore" data-layout="" data-yaml-mime="ManagedReference">
<header class="bg-body border-bottom">
<nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
<div class="container-xxl flex-nowrap">
<a class="navbar-brand" href="../index.html">
<img id="logo" class="svg" src="../logo.svg" alt="Misaki.HighPerformance">
Misaki.HighPerformance
</a>
<button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
<i class="bi bi-three-dots"></i>
</button>
<div class="collapse navbar-collapse" id="navpanel">
<div id="navbar">
<form class="search" role="search" id="search">
<i class="bi bi-search"></i>
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
</form>
</div>
</div>
</div>
</nav>
</header>
<main class="container-xxl">
<div class="toc-offcanvas">
<div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel">
<div class="offcanvas-header">
<h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#tocOffcanvas" aria-label="Close"></button>
</div>
<div class="offcanvas-body">
<nav class="toc" id="toc"></nav>
</div>
</div>
</div>
<div class="content">
<div class="actionbar">
<button class="btn btn-lg border-0 d-md-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas" aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents">
<i class="bi bi-list"></i>
</button>
<nav id="breadcrumb"></nav>
</div>
<article data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeMultiHashMap`2">
<h1 id="Misaki_HighPerformance_LowLevel_Collections_UnsafeMultiHashMap_2" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeMultiHashMap`2" class="text-break">
Struct UnsafeMultiHashMap&lt;TKey, TValue&gt;
</h1>
<div class="facts text-secondary">
<dl><dt>Namespace</dt><dd><a class="xref" href="Misaki.html">Misaki</a>.<a class="xref" href="Misaki.HighPerformance.html">HighPerformance</a>.<a class="xref" href="Misaki.HighPerformance.LowLevel.html">LowLevel</a>.<a class="xref" href="Misaki.HighPerformance.LowLevel.Collections.html">Collections</a></dd></dl>
<dl><dt>Assembly</dt><dd>Misaki.HighPerformance.LowLevel.dll</dd></dl>
</div>
<div class="markdown summary"></div>
<div class="markdown conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public struct UnsafeMultiHashMap&lt;TKey, TValue&gt; : IUnsafeHashCollection&lt;KeyValuePair&lt;TKey, TValue&gt;&gt;, IDisposable where TKey : unmanaged, IEquatable&lt;TKey&gt; where TValue : unmanaged</code></pre>
</div>
<h4 class="section">Type Parameters</h4>
<dl class="parameters">
<dt><code>TKey</code></dt>
<dd></dd>
<dt><code>TValue</code></dt>
<dd></dd>
</dl>
<dl class="typelist implements">
<dt>Implements</dt>
<dd>
<div><a class="xref" href="Misaki.HighPerformance.LowLevel.Collections.Contracts.IUnsafeHashCollection-1.html">IUnsafeHashCollection</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.keyvaluepair-2">KeyValuePair</a>&lt;TKey, TValue&gt;&gt;</div>
<div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.idisposable">IDisposable</a></div>
</dd>
</dl>
<dl class="typelist inheritedMembers">
<dt>Inherited Members</dt>
<dd>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.valuetype.equals">ValueType.Equals(object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.valuetype.gethashcode">ValueType.GetHashCode()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.valuetype.tostring">ValueType.ToString()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object, object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object, object)</a>
</div>
</dd></dl>
<h2 class="section" id="constructors">Constructors
</h2>
<a id="Misaki_HighPerformance_LowLevel_Collections_UnsafeMultiHashMap_2__ctor_" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeMultiHashMap`2.#ctor*"></a>
<h3 id="Misaki_HighPerformance_LowLevel_Collections_UnsafeMultiHashMap_2__ctor" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeMultiHashMap`2.#ctor">
UnsafeMultiHashMap()
</h3>
<div class="markdown level1 summary"><p>Initializes a new instance of UnsafeMultiHashMap with a default size of 1 and a persistent allocation handle.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public UnsafeMultiHashMap()</code></pre>
</div>
<a id="Misaki_HighPerformance_LowLevel_Collections_UnsafeMultiHashMap_2__ctor_" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeMultiHashMap`2.#ctor*"></a>
<h3 id="Misaki_HighPerformance_LowLevel_Collections_UnsafeMultiHashMap_2__ctor_System_Int32_Misaki_HighPerformance_LowLevel_Buffer_AllocationHandle_Misaki_HighPerformance_LowLevel_Buffer_AllocationOption_" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeMultiHashMap`2.#ctor(System.Int32,Misaki.HighPerformance.LowLevel.Buffer.AllocationHandle,Misaki.HighPerformance.LowLevel.Buffer.AllocationOption)">
UnsafeMultiHashMap(int, AllocationHandle, AllocationOption)
</h3>
<div class="markdown level1 summary"><p>Initializes a new instance of UnsafeMultiHashMap with the specified initial capacity and allocation handle.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public UnsafeMultiHashMap(int capacity, AllocationHandle handle, AllocationOption allocationOption = AllocationOption.None)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>capacity</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
<dd><p>The initial capacity of the hash map.</p>
</dd>
<dt><code>handle</code> <a class="xref" href="Misaki.HighPerformance.LowLevel.Buffer.AllocationHandle.html">AllocationHandle</a></dt>
<dd><p>The allocation handle.</p>
</dd>
<dt><code>allocationOption</code> <a class="xref" href="Misaki.HighPerformance.LowLevel.Buffer.AllocationOption.html">AllocationOption</a></dt>
<dd><p>The allocation option.</p>
</dd>
</dl>
<h2 class="section" id="properties">Properties
</h2>
<a id="Misaki_HighPerformance_LowLevel_Collections_UnsafeMultiHashMap_2_Capacity_" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeMultiHashMap`2.Capacity*"></a>
<h3 id="Misaki_HighPerformance_LowLevel_Collections_UnsafeMultiHashMap_2_Capacity" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeMultiHashMap`2.Capacity">
Capacity
</h3>
<div class="markdown level1 summary"></div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public readonly int Capacity { get; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
<dd></dd>
</dl>
<a id="Misaki_HighPerformance_LowLevel_Collections_UnsafeMultiHashMap_2_Count_" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeMultiHashMap`2.Count*"></a>
<h3 id="Misaki_HighPerformance_LowLevel_Collections_UnsafeMultiHashMap_2_Count" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeMultiHashMap`2.Count">
Count
</h3>
<div class="markdown level1 summary"><p>Gets the number of elements in a collection. The value is read-only.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public readonly int Count { get; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
<dd></dd>
</dl>
<a id="Misaki_HighPerformance_LowLevel_Collections_UnsafeMultiHashMap_2_IsCreated_" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeMultiHashMap`2.IsCreated*"></a>
<h3 id="Misaki_HighPerformance_LowLevel_Collections_UnsafeMultiHashMap_2_IsCreated" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeMultiHashMap`2.IsCreated">
IsCreated
</h3>
<div class="markdown level1 summary"><p>Indicates whether the object has been created. Returns true if the object is created, otherwise false.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public readonly bool IsCreated { get; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
<dd></dd>
</dl>
<h2 class="section" id="methods">Methods
</h2>
<a id="Misaki_HighPerformance_LowLevel_Collections_UnsafeMultiHashMap_2_Add_" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeMultiHashMap`2.Add*"></a>
<h3 id="Misaki_HighPerformance_LowLevel_Collections_UnsafeMultiHashMap_2_Add__0___1_" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeMultiHashMap`2.Add(`0@,`1)">
Add(scoped in TKey, TValue)
</h3>
<div class="markdown level1 summary"><p>Adds a key-value pair to the UnsafeMultiHashMap. If the key already exists, the new value will be added alongside the existing value(s) for that key, allowing multiple values to be associated with the same key.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public void Add(scoped in TKey key, TValue item)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>key</code> <span class="xref">TKey</span></dt>
<dd><p>The key to add.</p>
</dd>
<dt><code>item</code> <span class="xref">TValue</span></dt>
<dd><p>The value to add.</p>
</dd>
</dl>
<a id="Misaki_HighPerformance_LowLevel_Collections_UnsafeMultiHashMap_2_Clear_" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeMultiHashMap`2.Clear*"></a>
<h3 id="Misaki_HighPerformance_LowLevel_Collections_UnsafeMultiHashMap_2_Clear" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeMultiHashMap`2.Clear">
Clear()
</h3>
<div class="markdown level1 summary"><p>Removes all elements from the collection. The collection will be empty after this operation.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public void Clear()</code></pre>
</div>
<a id="Misaki_HighPerformance_LowLevel_Collections_UnsafeMultiHashMap_2_ContainsKey_" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeMultiHashMap`2.ContainsKey*"></a>
<h3 id="Misaki_HighPerformance_LowLevel_Collections_UnsafeMultiHashMap_2_ContainsKey__0__" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeMultiHashMap`2.ContainsKey(`0@)">
ContainsKey(scoped in TKey)
</h3>
<div class="markdown level1 summary"><p>Checks if the UnsafeMultiHashMap contains at least one value associated with the specified key.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public bool ContainsKey(scoped in TKey key)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>key</code> <span class="xref">TKey</span></dt>
<dd><p>The key to check for.</p>
</dd>
</dl>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
<dd><p>true if the key is found; otherwise, false.</p>
</dd>
</dl>
<a id="Misaki_HighPerformance_LowLevel_Collections_UnsafeMultiHashMap_2_CountValuesForKey_" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeMultiHashMap`2.CountValuesForKey*"></a>
<h3 id="Misaki_HighPerformance_LowLevel_Collections_UnsafeMultiHashMap_2_CountValuesForKey__0__" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeMultiHashMap`2.CountValuesForKey(`0@)">
CountValuesForKey(scoped in TKey)
</h3>
<div class="markdown level1 summary"><p>Counts the number of values associated with the specified key in the UnsafeMultiHashMap.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public int CountValuesForKey(scoped in TKey key)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>key</code> <span class="xref">TKey</span></dt>
<dd><p>The key for which to count values.</p>
</dd>
</dl>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
<dd><p>The number of values associated with the specified key.</p>
</dd>
</dl>
<a id="Misaki_HighPerformance_LowLevel_Collections_UnsafeMultiHashMap_2_Dispose_" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeMultiHashMap`2.Dispose*"></a>
<h3 id="Misaki_HighPerformance_LowLevel_Collections_UnsafeMultiHashMap_2_Dispose" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeMultiHashMap`2.Dispose">
Dispose()
</h3>
<div class="markdown level1 summary"><p>Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public void Dispose()</code></pre>
</div>
<a id="Misaki_HighPerformance_LowLevel_Collections_UnsafeMultiHashMap_2_GetEnumerator_" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeMultiHashMap`2.GetEnumerator*"></a>
<h3 id="Misaki_HighPerformance_LowLevel_Collections_UnsafeMultiHashMap_2_GetEnumerator" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeMultiHashMap`2.GetEnumerator">
GetEnumerator()
</h3>
<div class="markdown level1 summary"></div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">[UnscopedRef]
public UnsafeMultiHashMap&lt;TKey, TValue&gt;.Enumerator GetEnumerator()</code></pre>
</div>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="Misaki.HighPerformance.LowLevel.Collections.UnsafeMultiHashMap-2.html">UnsafeMultiHashMap</a>&lt;TKey, TValue&gt;.<a class="xref" href="Misaki.HighPerformance.LowLevel.Collections.UnsafeMultiHashMap-2.Enumerator.html">Enumerator</a></dt>
<dd></dd>
</dl>
<a id="Misaki_HighPerformance_LowLevel_Collections_UnsafeMultiHashMap_2_GetKeyArray_" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeMultiHashMap`2.GetKeyArray*"></a>
<h3 id="Misaki_HighPerformance_LowLevel_Collections_UnsafeMultiHashMap_2_GetKeyArray_Misaki_HighPerformance_LowLevel_Buffer_AllocationHandle_" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeMultiHashMap`2.GetKeyArray(Misaki.HighPerformance.LowLevel.Buffer.AllocationHandle)">
GetKeyArray(AllocationHandle)
</h3>
<div class="markdown level1 summary"><p>Gets an unsafe array containing all keys in the UnsafeMultiHashMap.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public UnsafeArray&lt;TKey&gt; GetKeyArray(AllocationHandle allocationHandle)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>allocationHandle</code> <a class="xref" href="Misaki.HighPerformance.LowLevel.Buffer.AllocationHandle.html">AllocationHandle</a></dt>
<dd><p>The handle for the allocation.</p>
</dd>
</dl>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="Misaki.HighPerformance.LowLevel.Collections.UnsafeArray-1.html">UnsafeArray</a>&lt;TKey&gt;</dt>
<dd><p>An unsafe array containing all keys in the UnsafeMultiHashMap.</p>
</dd>
</dl>
<a id="Misaki_HighPerformance_LowLevel_Collections_UnsafeMultiHashMap_2_GetKeyValueArrays_" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeMultiHashMap`2.GetKeyValueArrays*"></a>
<h3 id="Misaki_HighPerformance_LowLevel_Collections_UnsafeMultiHashMap_2_GetKeyValueArrays_Misaki_HighPerformance_LowLevel_Buffer_AllocationHandle_" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeMultiHashMap`2.GetKeyValueArrays(Misaki.HighPerformance.LowLevel.Buffer.AllocationHandle)">
GetKeyValueArrays(AllocationHandle)
</h3>
<div class="markdown level1 summary"><p>Gets an unsafe array containing all key-value pairs in the UnsafeMultiHashMap.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public UnsafeArray&lt;KeyValuePair&lt;TKey, TValue&gt;&gt; GetKeyValueArrays(AllocationHandle allocationHandle)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>allocationHandle</code> <a class="xref" href="Misaki.HighPerformance.LowLevel.Buffer.AllocationHandle.html">AllocationHandle</a></dt>
<dd><p>The handle for the allocation.</p>
</dd>
</dl>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="Misaki.HighPerformance.LowLevel.Collections.UnsafeArray-1.html">UnsafeArray</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.keyvaluepair-2">KeyValuePair</a>&lt;TKey, TValue&gt;&gt;</dt>
<dd><p>An unsafe array containing all key-value pairs in the UnsafeMultiHashMap.</p>
</dd>
</dl>
<a id="Misaki_HighPerformance_LowLevel_Collections_UnsafeMultiHashMap_2_GetUnsafePtr_" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeMultiHashMap`2.GetUnsafePtr*"></a>
<h3 id="Misaki_HighPerformance_LowLevel_Collections_UnsafeMultiHashMap_2_GetUnsafePtr" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeMultiHashMap`2.GetUnsafePtr">
GetUnsafePtr()
</h3>
<div class="markdown level1 summary"><p>Get a pointer to the internal buffer of the UnsafeMultiHashMap, which contains the key, values, and buckets. The caller must ensure that the pointer is not used after the UnsafeMultiHashMap has been disposed.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public readonly void* GetUnsafePtr()</code></pre>
</div>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.void">void</a>*</dt>
<dd><p>A pointer to the internal buffer.</p>
</dd>
</dl>
<a id="Misaki_HighPerformance_LowLevel_Collections_UnsafeMultiHashMap_2_GetValueArray_" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeMultiHashMap`2.GetValueArray*"></a>
<h3 id="Misaki_HighPerformance_LowLevel_Collections_UnsafeMultiHashMap_2_GetValueArray_Misaki_HighPerformance_LowLevel_Buffer_AllocationHandle_" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeMultiHashMap`2.GetValueArray(Misaki.HighPerformance.LowLevel.Buffer.AllocationHandle)">
GetValueArray(AllocationHandle)
</h3>
<div class="markdown level1 summary"><p>Gets an unsafe array containing all values in the UnsafeMultiHashMap.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public UnsafeArray&lt;TValue&gt; GetValueArray(AllocationHandle allocationHandle)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>allocationHandle</code> <a class="xref" href="Misaki.HighPerformance.LowLevel.Buffer.AllocationHandle.html">AllocationHandle</a></dt>
<dd><p>The handle for the allocation.</p>
</dd>
</dl>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="Misaki.HighPerformance.LowLevel.Collections.UnsafeArray-1.html">UnsafeArray</a>&lt;TValue&gt;</dt>
<dd><p>An unsafe array containing all values in the UnsafeMultiHashMap.</p>
</dd>
</dl>
<a id="Misaki_HighPerformance_LowLevel_Collections_UnsafeMultiHashMap_2_GetValueOrDefault_" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeMultiHashMap`2.GetValueOrDefault*"></a>
<h3 id="Misaki_HighPerformance_LowLevel_Collections_UnsafeMultiHashMap_2_GetValueOrDefault__0___1_" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeMultiHashMap`2.GetValueOrDefault(`0@,`1)">
GetValueOrDefault(scoped in TKey, TValue)
</h3>
<div class="markdown level1 summary"><p>Gets the first value associated with the specified key, or returns a default value if the key is not found in the UnsafeMultiHashMap.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public TValue GetValueOrDefault(scoped in TKey key, TValue defaultValue = default)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>key</code> <span class="xref">TKey</span></dt>
<dd><p>The key for which to get the value.</p>
</dd>
<dt><code>defaultValue</code> <span class="xref">TValue</span></dt>
<dd><p>The default value to return if the key is not found.</p>
</dd>
</dl>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><span class="xref">TValue</span></dt>
<dd><p>The first value associated with the specified key, or the default value if the key is not found.</p>
</dd>
</dl>
<a id="Misaki_HighPerformance_LowLevel_Collections_UnsafeMultiHashMap_2_GetValuesForKey_" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeMultiHashMap`2.GetValuesForKey*"></a>
<h3 id="Misaki_HighPerformance_LowLevel_Collections_UnsafeMultiHashMap_2_GetValuesForKey__0__" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeMultiHashMap`2.GetValuesForKey(`0@)">
GetValuesForKey(scoped in TKey)
</h3>
<div class="markdown level1 summary"><p>Gets an enumerable of all values associated with the specified key in the UnsafeMultiHashMap.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">[UnscopedRef]
public UnsafeMultiHashMap&lt;TKey, TValue&gt;.ValueEnumerable GetValuesForKey(scoped in TKey key)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>key</code> <span class="xref">TKey</span></dt>
<dd><p>The key for which to get the values.</p>
</dd>
</dl>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="Misaki.HighPerformance.LowLevel.Collections.UnsafeMultiHashMap-2.html">UnsafeMultiHashMap</a>&lt;TKey, TValue&gt;.<a class="xref" href="Misaki.HighPerformance.LowLevel.Collections.UnsafeMultiHashMap-2.ValueEnumerable.html">ValueEnumerable</a></dt>
<dd><p>An enumerable of all values associated with the specified key.</p>
</dd>
</dl>
<a id="Misaki_HighPerformance_LowLevel_Collections_UnsafeMultiHashMap_2_Remove_" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeMultiHashMap`2.Remove*"></a>
<h3 id="Misaki_HighPerformance_LowLevel_Collections_UnsafeMultiHashMap_2_Remove__0__" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeMultiHashMap`2.Remove(`0@)">
Remove(scoped in TKey)
</h3>
<div class="markdown level1 summary"><p>Removes all values associated with the specified key from the UnsafeMultiHashMap.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public bool Remove(scoped in TKey key)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>key</code> <span class="xref">TKey</span></dt>
<dd><p>The key for which to remove values.</p>
</dd>
</dl>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
<dd><p><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a> indicating whether any values were removed.</p>
</dd>
</dl>
<a id="Misaki_HighPerformance_LowLevel_Collections_UnsafeMultiHashMap_2_Resize_" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeMultiHashMap`2.Resize*"></a>
<h3 id="Misaki_HighPerformance_LowLevel_Collections_UnsafeMultiHashMap_2_Resize_System_Int32_Misaki_HighPerformance_LowLevel_Buffer_AllocationOption_" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeMultiHashMap`2.Resize(System.Int32,Misaki.HighPerformance.LowLevel.Buffer.AllocationOption)">
Resize(int, AllocationOption)
</h3>
<div class="markdown level1 summary"><p>Changes the size of a collection to the specified value.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public void Resize(int newSize, AllocationOption option = AllocationOption.None)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>newSize</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
<dd><p>Specifies the new size to which the collection should be adjusted.</p>
</dd>
<dt><code>option</code> <a class="xref" href="Misaki.HighPerformance.LowLevel.Buffer.AllocationOption.html">AllocationOption</a></dt>
<dd><p>Specifies allocation options that may affect how memory is managed during the resize operation.</p>
</dd>
</dl>
<h4 class="section" id="Misaki_HighPerformance_LowLevel_Collections_UnsafeMultiHashMap_2_Resize_System_Int32_Misaki_HighPerformance_LowLevel_Buffer_AllocationOption__remarks">Remarks</h4>
<div class="markdown level1 remarks"><p>This is to adjust the element count of the collection, not the size of the underlying buffer in memory.</p>
</div>
<a id="Misaki_HighPerformance_LowLevel_Collections_UnsafeMultiHashMap_2_TrimExcess_" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeMultiHashMap`2.TrimExcess*"></a>
<h3 id="Misaki_HighPerformance_LowLevel_Collections_UnsafeMultiHashMap_2_TrimExcess" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeMultiHashMap`2.TrimExcess">
TrimExcess()
</h3>
<div class="markdown level1 summary"><p>Trim the excess capacity of the UnsafeMultiHashMap, reducing the capacity to match the current count of key-value pairs.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public void TrimExcess()</code></pre>
</div>
<a id="Misaki_HighPerformance_LowLevel_Collections_UnsafeMultiHashMap_2_TryGetFirstValue_" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeMultiHashMap`2.TryGetFirstValue*"></a>
<h3 id="Misaki_HighPerformance_LowLevel_Collections_UnsafeMultiHashMap_2_TryGetFirstValue__0___1__Misaki_HighPerformance_LowLevel_Collections_UnsafeMultiHashMap__0__1__Iterator__" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeMultiHashMap`2.TryGetFirstValue(`0@,`1@,Misaki.HighPerformance.LowLevel.Collections.UnsafeMultiHashMap{`0,`1}.Iterator@)">
TryGetFirstValue(scoped in TKey, out TValue, out Iterator)
</h3>
<div class="markdown level1 summary"><p>Tries to get the first value associated with the specified key.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public bool TryGetFirstValue(scoped in TKey key, out TValue item, out UnsafeMultiHashMap&lt;TKey, TValue&gt;.Iterator iterator)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>key</code> <span class="xref">TKey</span></dt>
<dd><p>The key for which to get the first value.</p>
</dd>
<dt><code>item</code> <span class="xref">TValue</span></dt>
<dd><p>When this method returns, contains the first value associated with the specified key, if the key is found; otherwise, the default value for the type of the item parameter.</p>
</dd>
<dt><code>iterator</code> <a class="xref" href="Misaki.HighPerformance.LowLevel.Collections.UnsafeMultiHashMap-2.html">UnsafeMultiHashMap</a>&lt;TKey, TValue&gt;.<a class="xref" href="Misaki.HighPerformance.LowLevel.Collections.UnsafeMultiHashMap-2.Iterator.html">Iterator</a></dt>
<dd><p>When this method returns, contains the iterator for the first value associated with the specified key, if the key is found; otherwise, an invalid iterator.</p>
</dd>
</dl>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
<dd><p>true if the key was found and the first value was retrieved; otherwise, false.</p>
</dd>
</dl>
<a id="Misaki_HighPerformance_LowLevel_Collections_UnsafeMultiHashMap_2_TryGetNextValue_" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeMultiHashMap`2.TryGetNextValue*"></a>
<h3 id="Misaki_HighPerformance_LowLevel_Collections_UnsafeMultiHashMap_2_TryGetNextValue__1__Misaki_HighPerformance_LowLevel_Collections_UnsafeMultiHashMap__0__1__Iterator__" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeMultiHashMap`2.TryGetNextValue(`1@,Misaki.HighPerformance.LowLevel.Collections.UnsafeMultiHashMap{`0,`1}.Iterator@)">
TryGetNextValue(out TValue, ref Iterator)
</h3>
<div class="markdown level1 summary"><p>Tries to get the next value associated with the key from the UnsafeMultiHashMap using the provided iterator.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public bool TryGetNextValue(out TValue item, ref UnsafeMultiHashMap&lt;TKey, TValue&gt;.Iterator iterator)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>item</code> <span class="xref">TValue</span></dt>
<dd><p>When this method returns, contains the next value associated with the specified key, if the key is found; otherwise, the default value for the type of the item parameter.</p>
</dd>
<dt><code>iterator</code> <a class="xref" href="Misaki.HighPerformance.LowLevel.Collections.UnsafeMultiHashMap-2.html">UnsafeMultiHashMap</a>&lt;TKey, TValue&gt;.<a class="xref" href="Misaki.HighPerformance.LowLevel.Collections.UnsafeMultiHashMap-2.Iterator.html">Iterator</a></dt>
<dd><p>The iterator to use for finding the next value.</p>
</dd>
</dl>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
<dd><p>true if a value was found for the specified key; otherwise, false.</p>
</dd>
</dl>
<a id="Misaki_HighPerformance_LowLevel_Collections_UnsafeMultiHashMap_2_TryGetValue_" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeMultiHashMap`2.TryGetValue*"></a>
<h3 id="Misaki_HighPerformance_LowLevel_Collections_UnsafeMultiHashMap_2_TryGetValue__0___1__" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeMultiHashMap`2.TryGetValue(`0@,`1@)">
TryGetValue(scoped in TKey, out TValue)
</h3>
<div class="markdown level1 summary"><p>Tries to get the first value associated with the specified key.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public bool TryGetValue(scoped in TKey key, out TValue item)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>key</code> <span class="xref">TKey</span></dt>
<dd><p>The key for which to get the first value.</p>
</dd>
<dt><code>item</code> <span class="xref">TValue</span></dt>
<dd><p>When this method returns, contains the first value associated with the specified key, if the key is found; otherwise, the default value for the type of the item parameter.</p>
</dd>
</dl>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
<dd><p>true if the key was found and the first value was retrieved; otherwise, false.</p>
</dd>
</dl>
</article>
<div class="contribution d-print-none">
</div>
</div>
<div class="affix">
<nav id="affix"></nav>
</div>
</main>
<div class="container-xxl search-results" id="search-results"></div>
<footer class="border-top text-secondary">
<div class="container-xxl">
<div class="flex-fill">
<span>Made with <a href="https://dotnet.github.io/docfx">docfx</a></span>
</div>
</div>
</footer>
</body>
</html>