diff --git a/404.html b/404.html index 96d6476..40e6bac 100644 --- a/404.html +++ b/404.html @@ -4,13 +4,13 @@ Page Not Found | Extended.Collections - +
Skip to main content

Page Not Found

We could not find what you were looking for.

Please contact the owner of the site that linked you to the original URL and let them know their link is broken.

- + \ No newline at end of file diff --git a/__docusaurus/debug.html b/__docusaurus/debug.html index 7d74826..781b917 100644 --- a/__docusaurus/debug.html +++ b/__docusaurus/debug.html @@ -4,13 +4,13 @@ Docusaurus debug panel - +

Site config

- + \ No newline at end of file diff --git a/__docusaurus/debug/config.html b/__docusaurus/debug/config.html index f5adbe3..58bdda6 100644 --- a/__docusaurus/debug/config.html +++ b/__docusaurus/debug/config.html @@ -4,13 +4,13 @@ Docusaurus debug panel - +

Site config

- + \ No newline at end of file diff --git a/__docusaurus/debug/content.html b/__docusaurus/debug/content.html index d554669..b4f52b1 100644 --- a/__docusaurus/debug/content.html +++ b/__docusaurus/debug/content.html @@ -4,13 +4,13 @@ Docusaurus debug panel - +

Plugin content

docusaurus-plugin-content-docs

default
- + \ No newline at end of file diff --git a/__docusaurus/debug/globalData.html b/__docusaurus/debug/globalData.html index 8b80b26..00f9dea 100644 --- a/__docusaurus/debug/globalData.html +++ b/__docusaurus/debug/globalData.html @@ -4,13 +4,13 @@ Docusaurus debug panel - +

Global data

- + \ No newline at end of file diff --git a/__docusaurus/debug/metadata.html b/__docusaurus/debug/metadata.html index e9ae98b..049083a 100644 --- a/__docusaurus/debug/metadata.html +++ b/__docusaurus/debug/metadata.html @@ -4,13 +4,13 @@ Docusaurus debug panel - +

Site Metadata

Docusaurus Version: 2.4.1
Site Version: 0.0.0

Plugins and themes

  • 2.4.1
    docusaurus-plugin-debug
    Type: package
  • 2.4.1
    docusaurus-theme-classic
    Type: package
  • 2.4.1
    docusaurus-plugin-sitemap
    Type: package
  • 2.4.1
    docusaurus-plugin-content-docs
    Type: package
- + \ No newline at end of file diff --git a/__docusaurus/debug/registry.html b/__docusaurus/debug/registry.html index c16caa7..9aac0fb 100644 --- a/__docusaurus/debug/registry.html +++ b/__docusaurus/debug/registry.html @@ -4,13 +4,13 @@ Docusaurus debug panel - +

Registry

  • Aliased Path: @theme/DocItem
    Resolved Path: 9714
  • Aliased Path: /home/runner/work/Extended.Collections/Extended.Collections/docusaurus/.docusaurus/docusaurus-plugin-debug/default/plugin-route-context-module-100.json
    Resolved Path: 3984
  • Aliased Path: @theme/DocPage
    Resolved Path: 1551
  • Aliased Path: @site/../documentation/generic/specialized/ordered_dictionary.md
    Resolved Path: 1245
  • Aliased Path: @theme/DebugConfig
    Resolved Path: 6074
  • Aliased Path: ~debug/default/docusaurus-debug-all-content-673.json
    Resolved Path: 6267
  • Aliased Path: @site/../documentation/generic/ring_buffer.md
    Resolved Path: 5381
  • Aliased Path: @theme/DebugRegistry
    Resolved Path: 8165
  • Aliased Path: @theme/DebugSiteMetadata
    Resolved Path: 3767
  • Aliased Path: @site/../documentation/index.md
    Resolved Path: 9068
  • Aliased Path: ~docs/default/version-current-metadata-prop-751.json
    Resolved Path: 1109
  • Aliased Path: @theme/DebugRoutes
    Resolved Path: 7327
  • Aliased Path: @theme/DebugContent
    Resolved Path: 793
  • Aliased Path: /home/runner/work/Extended.Collections/Extended.Collections/docusaurus/.docusaurus/docusaurus-plugin-content-docs/default/plugin-route-context-module-100.json
    Resolved Path: 3769
  • Aliased Path: @theme/DebugGlobalData
    Resolved Path: 2507
- + \ No newline at end of file diff --git a/__docusaurus/debug/routes.html b/__docusaurus/debug/routes.html index f9e62ba..887112c 100644 --- a/__docusaurus/debug/routes.html +++ b/__docusaurus/debug/routes.html @@ -4,13 +4,13 @@ Docusaurus debug panel - +

Routes

  • /Extended.Collections/__docusaurus/debug
    Is exact: true
  • /Extended.Collections/__docusaurus/debug/config
    Is exact: true
  • /Extended.Collections/__docusaurus/debug/content
    Is exact: true
  • /Extended.Collections/__docusaurus/debug/globalData
    Is exact: true
  • /Extended.Collections/__docusaurus/debug/metadata
    Is exact: true
  • /Extended.Collections/__docusaurus/debug/registry
    Is exact: true
  • /Extended.Collections/__docusaurus/debug/routes
    Is exact: true
  • /Extended.Collections/
    Is exact: false
    Child Routes:
  • *
    Is exact: false
- + \ No newline at end of file diff --git a/assets/js/1f958b60.30c05832.js b/assets/js/1f958b60.22f2200b.js similarity index 98% rename from assets/js/1f958b60.30c05832.js rename to assets/js/1f958b60.22f2200b.js index ca211b0..3daef01 100644 --- a/assets/js/1f958b60.30c05832.js +++ b/assets/js/1f958b60.22f2200b.js @@ -1 +1 @@ -"use strict";(self.webpackChunkextended_collections=self.webpackChunkextended_collections||[]).push([[333],{3905:(e,t,r)=>{r.d(t,{Zo:()=>d,kt:()=>f});var n=r(7294);function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function o(e){for(var t=1;t=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}var s=n.createContext({}),l=function(e){var t=n.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):o(o({},t),e)),r},d=function(e){var t=l(e.components);return n.createElement(s.Provider,{value:t},e.children)},p="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},y=n.forwardRef((function(e,t){var r=e.components,i=e.mdxType,a=e.originalType,s=e.parentName,d=c(e,["components","mdxType","originalType","parentName"]),p=l(r),y=i,f=p["".concat(s,".").concat(y)]||p[y]||u[y]||a;return r?n.createElement(f,o(o({ref:t},d),{},{components:r})):n.createElement(f,o({ref:t},d))}));function f(e,t){var r=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var a=r.length,o=new Array(a);o[0]=y;var c={};for(var s in t)hasOwnProperty.call(t,s)&&(c[s]=t[s]);c.originalType=e,c[p]="string"==typeof e?e:i,o[1]=c;for(var l=2;l{r.r(t),r.d(t,{assets:()=>s,contentTitle:()=>o,default:()=>u,frontMatter:()=>a,metadata:()=>c,toc:()=>l});var n=r(7462),i=(r(7294),r(3905));const a={},o="Ordered Dictionary",c={unversionedId:"generic/specialized/ordered_dictionary",id:"generic/specialized/ordered_dictionary",title:"Ordered Dictionary",description:"Combines the features of a dictionary and a list, allowing key-value pairs to be stored in a specific order and accessed efficiently by their keys.",source:"@site/../documentation/generic/specialized/ordered_dictionary.md",sourceDirName:"generic/specialized",slug:"/generic/specialized/ordered_dictionary",permalink:"/Extended.Collections/generic/specialized/ordered_dictionary",draft:!1,editUrl:"https://github.com/ByronMayne/Extended.Collections/edit/main/documentation/generic/specialized/ordered_dictionary.md",tags:[],version:"current",lastUpdatedAt:1694476038,formattedLastUpdatedAt:"Sep 11, 2023",frontMatter:{},sidebar:"defaultSidebar",previous:{title:"Ring Buffer",permalink:"/Extended.Collections/generic/ring_buffer"}},s={},l=[{value:"Hypothetical Use Case:",id:"hypothetical-use-case",level:3}],d={toc:l},p="wrapper";function u(e){let{components:t,...r}=e;return(0,i.kt)(p,(0,n.Z)({},d,r,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("h1",{id:"ordered-dictionary"},"Ordered Dictionary"),(0,i.kt)("p",null,"Combines the features of a dictionary and a list, allowing key-value pairs to be stored in a specific order and accessed efficiently by their keys. "),(0,i.kt)("p",null,"Pros:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"Maintains the order of key-value pairs, which can be useful for scenarios where the order of insertion or access is important."),(0,i.kt)("li",{parentName:"ul"},"Provides the functionality of a dictionary, allowing for fast key-based lookups."),(0,i.kt)("li",{parentName:"ul"},"Supports generic TKey and TValue types, making it flexible for various data types.")),(0,i.kt)("p",null,"Cons:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"Slightly higher memory usage compared to a regular dictionary due to the need to store the order of items."),(0,i.kt)("li",{parentName:"ul"},"Some operations may be slower compared to a regular dictionary due to maintaining the order.")),(0,i.kt)("h3",{id:"hypothetical-use-case"},"Hypothetical Use Case:"),(0,i.kt)("p",null,"Suppose you are building a task management application, and you need to maintain a list of tasks for a project while preserving the order in which they were added. An OrderedDictionary can be useful in this scenario to store and manage tasks associated with a project."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-cs"},'using System;\nusing System.Collections.Specialized;\n\nclass Program\n{\n static void Main()\n {\n // Create an OrderedDictionary to store tasks for a project.\n OrderedDictionary projectTasks = new OrderedDictionary();\n\n // Add tasks to the project in a specific order.\n projectTasks.Add("Task1", "Complete research");\n projectTasks.Add("Task2", "Write documentation");\n projectTasks.Add("Task3", "Test functionality");\n\n // Access tasks by their keys while maintaining their order.\n Console.WriteLine("Project Tasks:");\n foreach (DictionaryEntry entry in projectTasks)\n {\n Console.WriteLine($"{entry.Key}: {entry.Value}");\n }\n }\n}\n')))}u.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkextended_collections=self.webpackChunkextended_collections||[]).push([[333],{3905:(e,t,r)=>{r.d(t,{Zo:()=>d,kt:()=>f});var n=r(7294);function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function o(e){for(var t=1;t=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}var s=n.createContext({}),l=function(e){var t=n.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):o(o({},t),e)),r},d=function(e){var t=l(e.components);return n.createElement(s.Provider,{value:t},e.children)},p="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},y=n.forwardRef((function(e,t){var r=e.components,i=e.mdxType,a=e.originalType,s=e.parentName,d=c(e,["components","mdxType","originalType","parentName"]),p=l(r),y=i,f=p["".concat(s,".").concat(y)]||p[y]||u[y]||a;return r?n.createElement(f,o(o({ref:t},d),{},{components:r})):n.createElement(f,o({ref:t},d))}));function f(e,t){var r=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var a=r.length,o=new Array(a);o[0]=y;var c={};for(var s in t)hasOwnProperty.call(t,s)&&(c[s]=t[s]);c.originalType=e,c[p]="string"==typeof e?e:i,o[1]=c;for(var l=2;l{r.r(t),r.d(t,{assets:()=>s,contentTitle:()=>o,default:()=>u,frontMatter:()=>a,metadata:()=>c,toc:()=>l});var n=r(7462),i=(r(7294),r(3905));const a={},o="Ordered Dictionary",c={unversionedId:"generic/specialized/ordered_dictionary",id:"generic/specialized/ordered_dictionary",title:"Ordered Dictionary",description:"Combines the features of a dictionary and a list, allowing key-value pairs to be stored in a specific order and accessed efficiently by their keys.",source:"@site/../documentation/generic/specialized/ordered_dictionary.md",sourceDirName:"generic/specialized",slug:"/generic/specialized/ordered_dictionary",permalink:"/Extended.Collections/generic/specialized/ordered_dictionary",draft:!1,editUrl:"https://github.com/ByronMayne/Extended.Collections/edit/main/documentation/generic/specialized/ordered_dictionary.md",tags:[],version:"current",lastUpdatedAt:1694476629,formattedLastUpdatedAt:"Sep 11, 2023",frontMatter:{},sidebar:"defaultSidebar",previous:{title:"Ring Buffer",permalink:"/Extended.Collections/generic/ring_buffer"}},s={},l=[{value:"Hypothetical Use Case:",id:"hypothetical-use-case",level:3}],d={toc:l},p="wrapper";function u(e){let{components:t,...r}=e;return(0,i.kt)(p,(0,n.Z)({},d,r,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("h1",{id:"ordered-dictionary"},"Ordered Dictionary"),(0,i.kt)("p",null,"Combines the features of a dictionary and a list, allowing key-value pairs to be stored in a specific order and accessed efficiently by their keys. "),(0,i.kt)("p",null,"Pros:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"Maintains the order of key-value pairs, which can be useful for scenarios where the order of insertion or access is important."),(0,i.kt)("li",{parentName:"ul"},"Provides the functionality of a dictionary, allowing for fast key-based lookups."),(0,i.kt)("li",{parentName:"ul"},"Supports generic TKey and TValue types, making it flexible for various data types.")),(0,i.kt)("p",null,"Cons:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"Slightly higher memory usage compared to a regular dictionary due to the need to store the order of items."),(0,i.kt)("li",{parentName:"ul"},"Some operations may be slower compared to a regular dictionary due to maintaining the order.")),(0,i.kt)("h3",{id:"hypothetical-use-case"},"Hypothetical Use Case:"),(0,i.kt)("p",null,"Suppose you are building a task management application, and you need to maintain a list of tasks for a project while preserving the order in which they were added. An OrderedDictionary can be useful in this scenario to store and manage tasks associated with a project."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-cs"},'using System;\nusing System.Collections.Specialized;\n\nclass Program\n{\n static void Main()\n {\n // Create an OrderedDictionary to store tasks for a project.\n OrderedDictionary projectTasks = new OrderedDictionary();\n\n // Add tasks to the project in a specific order.\n projectTasks.Add("Task1", "Complete research");\n projectTasks.Add("Task2", "Write documentation");\n projectTasks.Add("Task3", "Test functionality");\n\n // Access tasks by their keys while maintaining their order.\n Console.WriteLine("Project Tasks:");\n foreach (DictionaryEntry entry in projectTasks)\n {\n Console.WriteLine($"{entry.Key}: {entry.Value}");\n }\n }\n}\n')))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/246f2c6f.87ba33c6.js b/assets/js/246f2c6f.4ed86aaa.js similarity index 93% rename from assets/js/246f2c6f.87ba33c6.js rename to assets/js/246f2c6f.4ed86aaa.js index e7974f2..22dad9a 100644 --- a/assets/js/246f2c6f.87ba33c6.js +++ b/assets/js/246f2c6f.4ed86aaa.js @@ -1 +1 @@ -"use strict";(self.webpackChunkextended_collections=self.webpackChunkextended_collections||[]).push([[285],{6267:e=>{e.exports=JSON.parse('{"docusaurus-plugin-debug":{},"docusaurus-theme-classic":{},"docusaurus-plugin-sitemap":{},"docusaurus-plugin-content-docs":{"default":{"loadedVersions":[{"versionName":"current","label":"Next","banner":null,"badge":false,"noIndex":false,"className":"docs-version-current","path":"/Extended.Collections/","tagsPath":"/Extended.Collections/tags","isLast":true,"routePriority":-1,"contentPath":"/home/runner/work/Extended.Collections/Extended.Collections/documentation","contentPathLocalized":"/home/runner/work/Extended.Collections/Extended.Collections/docusaurus/i18n/en/docusaurus-plugin-content-docs/current","docs":[{"unversionedId":"generic/ring_buffer","id":"generic/ring_buffer","title":"Ring Buffer","description":"A ring buffer is a data structure that efficiently manages a fixed-size, cyclically-referenced buffer, allowing for constant-time insertions and removals while overwriting the oldest data when full.","source":"@site/../documentation/generic/ring_buffer.md","sourceDirName":"generic","slug":"/generic/ring_buffer","permalink":"/Extended.Collections/generic/ring_buffer","draft":false,"editUrl":"https://github.com/ByronMayne/Extended.Collections/edit/main/documentation/generic/ring_buffer.md","tags":[],"version":"current","lastUpdatedAt":1694476038,"formattedLastUpdatedAt":"Sep 11, 2023","frontMatter":{},"sidebar":"defaultSidebar","previous":{"title":"Introduction","permalink":"/Extended.Collections/"},"next":{"title":"Ordered Dictionary","permalink":"/Extended.Collections/generic/specialized/ordered_dictionary"}},{"unversionedId":"generic/specialized/ordered_dictionary","id":"generic/specialized/ordered_dictionary","title":"Ordered Dictionary","description":"Combines the features of a dictionary and a list, allowing key-value pairs to be stored in a specific order and accessed efficiently by their keys.","source":"@site/../documentation/generic/specialized/ordered_dictionary.md","sourceDirName":"generic/specialized","slug":"/generic/specialized/ordered_dictionary","permalink":"/Extended.Collections/generic/specialized/ordered_dictionary","draft":false,"editUrl":"https://github.com/ByronMayne/Extended.Collections/edit/main/documentation/generic/specialized/ordered_dictionary.md","tags":[],"version":"current","lastUpdatedAt":1694476038,"formattedLastUpdatedAt":"Sep 11, 2023","frontMatter":{},"sidebar":"defaultSidebar","previous":{"title":"Ring Buffer","permalink":"/Extended.Collections/generic/ring_buffer"}},{"unversionedId":"index","id":"index","title":"Introduction","description":"Collections Extended a zero dependency netstandard library that contains an array of different generic collections to use in any application. Each collection has it\'s own use","source":"@site/../documentation/index.md","sourceDirName":".","slug":"/","permalink":"/Extended.Collections/","draft":false,"editUrl":"https://github.com/ByronMayne/Extended.Collections/edit/main/documentation/index.md","tags":[],"version":"current","lastUpdatedAt":1694476038,"formattedLastUpdatedAt":"Sep 11, 2023","sidebarPosition":1,"frontMatter":{"sidebar_position":1},"sidebar":"defaultSidebar","next":{"title":"Ring Buffer","permalink":"/Extended.Collections/generic/ring_buffer"}}],"drafts":[],"sidebars":{"defaultSidebar":[{"type":"doc","id":"index"},{"type":"category","label":"Generic","collapsible":true,"collapsed":true,"items":[{"type":"doc","id":"generic/ring_buffer"},{"type":"category","label":"specialized","collapsible":true,"collapsed":true,"items":[{"type":"doc","id":"generic/specialized/ordered_dictionary"}]}]}]}}]}},"docusaurus-bootstrap-plugin":{},"docusaurus-mdx-fallback-plugin":{}}')}}]); \ No newline at end of file +"use strict";(self.webpackChunkextended_collections=self.webpackChunkextended_collections||[]).push([[285],{6267:e=>{e.exports=JSON.parse('{"docusaurus-plugin-debug":{},"docusaurus-theme-classic":{},"docusaurus-plugin-sitemap":{},"docusaurus-plugin-content-docs":{"default":{"loadedVersions":[{"versionName":"current","label":"Next","banner":null,"badge":false,"noIndex":false,"className":"docs-version-current","path":"/Extended.Collections/","tagsPath":"/Extended.Collections/tags","isLast":true,"routePriority":-1,"contentPath":"/home/runner/work/Extended.Collections/Extended.Collections/documentation","contentPathLocalized":"/home/runner/work/Extended.Collections/Extended.Collections/docusaurus/i18n/en/docusaurus-plugin-content-docs/current","docs":[{"unversionedId":"generic/ring_buffer","id":"generic/ring_buffer","title":"Ring Buffer","description":"A ring buffer is a data structure that efficiently manages a fixed-size, cyclically-referenced buffer, allowing for constant-time insertions and removals while overwriting the oldest data when full.","source":"@site/../documentation/generic/ring_buffer.md","sourceDirName":"generic","slug":"/generic/ring_buffer","permalink":"/Extended.Collections/generic/ring_buffer","draft":false,"editUrl":"https://github.com/ByronMayne/Extended.Collections/edit/main/documentation/generic/ring_buffer.md","tags":[],"version":"current","lastUpdatedAt":1694476629,"formattedLastUpdatedAt":"Sep 11, 2023","frontMatter":{},"sidebar":"defaultSidebar","previous":{"title":"Introduction","permalink":"/Extended.Collections/"},"next":{"title":"Ordered Dictionary","permalink":"/Extended.Collections/generic/specialized/ordered_dictionary"}},{"unversionedId":"generic/specialized/ordered_dictionary","id":"generic/specialized/ordered_dictionary","title":"Ordered Dictionary","description":"Combines the features of a dictionary and a list, allowing key-value pairs to be stored in a specific order and accessed efficiently by their keys.","source":"@site/../documentation/generic/specialized/ordered_dictionary.md","sourceDirName":"generic/specialized","slug":"/generic/specialized/ordered_dictionary","permalink":"/Extended.Collections/generic/specialized/ordered_dictionary","draft":false,"editUrl":"https://github.com/ByronMayne/Extended.Collections/edit/main/documentation/generic/specialized/ordered_dictionary.md","tags":[],"version":"current","lastUpdatedAt":1694476629,"formattedLastUpdatedAt":"Sep 11, 2023","frontMatter":{},"sidebar":"defaultSidebar","previous":{"title":"Ring Buffer","permalink":"/Extended.Collections/generic/ring_buffer"}},{"unversionedId":"index","id":"index","title":"Introduction","description":"Collections Extended a zero dependency netstandard library that contains an array of different generic collections to use in any application. Each collection has it\'s own use","source":"@site/../documentation/index.md","sourceDirName":".","slug":"/","permalink":"/Extended.Collections/","draft":false,"editUrl":"https://github.com/ByronMayne/Extended.Collections/edit/main/documentation/index.md","tags":[],"version":"current","lastUpdatedAt":1694476629,"formattedLastUpdatedAt":"Sep 11, 2023","sidebarPosition":1,"frontMatter":{"sidebar_position":1},"sidebar":"defaultSidebar","next":{"title":"Ring Buffer","permalink":"/Extended.Collections/generic/ring_buffer"}}],"drafts":[],"sidebars":{"defaultSidebar":[{"type":"doc","id":"index"},{"type":"category","label":"Generic","collapsible":true,"collapsed":true,"items":[{"type":"doc","id":"generic/ring_buffer"},{"type":"category","label":"specialized","collapsible":true,"collapsed":true,"items":[{"type":"doc","id":"generic/specialized/ordered_dictionary"}]}]}]}}]}},"docusaurus-bootstrap-plugin":{},"docusaurus-mdx-fallback-plugin":{}}')}}]); \ No newline at end of file diff --git a/assets/js/418073dd.b9152ad9.js b/assets/js/418073dd.c40a4141.js similarity index 98% rename from assets/js/418073dd.b9152ad9.js rename to assets/js/418073dd.c40a4141.js index 29621ce..b789949 100644 --- a/assets/js/418073dd.b9152ad9.js +++ b/assets/js/418073dd.c40a4141.js @@ -1 +1 @@ -"use strict";(self.webpackChunkextended_collections=self.webpackChunkextended_collections||[]).push([[21],{3905:(e,n,r)=>{r.d(n,{Zo:()=>u,kt:()=>m});var t=r(7294);function i(e,n,r){return n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function o(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),r.push.apply(r,t)}return r}function f(e){for(var n=1;n=0||(i[r]=e[r]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}var c=t.createContext({}),l=function(e){var n=t.useContext(c),r=n;return e&&(r="function"==typeof e?e(n):f(f({},n),e)),r},u=function(e){var n=l(e.components);return t.createElement(c.Provider,{value:n},e.children)},d="mdxType",s={inlineCode:"code",wrapper:function(e){var n=e.children;return t.createElement(t.Fragment,{},n)}},p=t.forwardRef((function(e,n){var r=e.components,i=e.mdxType,o=e.originalType,c=e.parentName,u=a(e,["components","mdxType","originalType","parentName"]),d=l(r),p=i,m=d["".concat(c,".").concat(p)]||d[p]||s[p]||o;return r?t.createElement(m,f(f({ref:n},u),{},{components:r})):t.createElement(m,f({ref:n},u))}));function m(e,n){var r=arguments,i=n&&n.mdxType;if("string"==typeof e||i){var o=r.length,f=new Array(o);f[0]=p;var a={};for(var c in n)hasOwnProperty.call(n,c)&&(a[c]=n[c]);a.originalType=e,a[d]="string"==typeof e?e:i,f[1]=a;for(var l=2;l{r.r(n),r.d(n,{assets:()=>c,contentTitle:()=>f,default:()=>s,frontMatter:()=>o,metadata:()=>a,toc:()=>l});var t=r(7462),i=(r(7294),r(3905));const o={},f="Ring Buffer",a={unversionedId:"generic/ring_buffer",id:"generic/ring_buffer",title:"Ring Buffer",description:"A ring buffer is a data structure that efficiently manages a fixed-size, cyclically-referenced buffer, allowing for constant-time insertions and removals while overwriting the oldest data when full.",source:"@site/../documentation/generic/ring_buffer.md",sourceDirName:"generic",slug:"/generic/ring_buffer",permalink:"/Extended.Collections/generic/ring_buffer",draft:!1,editUrl:"https://github.com/ByronMayne/Extended.Collections/edit/main/documentation/generic/ring_buffer.md",tags:[],version:"current",lastUpdatedAt:1694476038,formattedLastUpdatedAt:"Sep 11, 2023",frontMatter:{},sidebar:"defaultSidebar",previous:{title:"Introduction",permalink:"/Extended.Collections/"},next:{title:"Ordered Dictionary",permalink:"/Extended.Collections/generic/specialized/ordered_dictionary"}},c={},l=[],u={toc:l},d="wrapper";function s(e){let{components:n,...r}=e;return(0,i.kt)(d,(0,t.Z)({},u,r,{components:n,mdxType:"MDXLayout"}),(0,i.kt)("h1",{id:"ring-buffer"},"Ring Buffer"),(0,i.kt)("p",null,"A ring buffer is a data structure that efficiently manages a fixed-size, cyclically-referenced buffer, allowing for constant-time insertions and removals while overwriting the oldest data when full."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-csharp",metastring:"title=RingBufferSandbox.cs",title:"RingBufferSandbox.cs"},'using Extended.Collections.Generic;\n\nnamespace Extended.Collections.Playground.Generic\n{\n public class RingBufferSandbox : Sandbox\n {\n private readonly RingBuffer m_buffer;\n\n public RingBufferSandbox()\n {\n m_buffer = new RingBuffer(3);\n }\n\n protected override void Run()\n {\n m_buffer.Add("A");\n m_buffer.Add("B");\n m_buffer.Add("C");\n Logger.Information("1. {Buffer}", m_buffer); // 1. [ "A", "B", "C" ]\n\n m_buffer.Add("D");\n Logger.Information("2. {Buffer}", m_buffer); // 2. [ "B", "C", "D" ]\n\n m_buffer.Remove("C");\n Logger.Information("3. {Buffer}", m_buffer); // 3. [ "B", "D" ]\n\n m_buffer.Add("E");\n Logger.Information("4. {Buffer}", m_buffer); // 4. [ "B", "D", "E" ]\n\n m_buffer.Clear();\n Logger.Information("5. {Buffer}", m_buffer); // [ ]\n }\n }\n}\n')))}s.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkextended_collections=self.webpackChunkextended_collections||[]).push([[21],{3905:(e,n,r)=>{r.d(n,{Zo:()=>u,kt:()=>m});var t=r(7294);function i(e,n,r){return n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function o(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),r.push.apply(r,t)}return r}function f(e){for(var n=1;n=0||(i[r]=e[r]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}var c=t.createContext({}),l=function(e){var n=t.useContext(c),r=n;return e&&(r="function"==typeof e?e(n):f(f({},n),e)),r},u=function(e){var n=l(e.components);return t.createElement(c.Provider,{value:n},e.children)},d="mdxType",s={inlineCode:"code",wrapper:function(e){var n=e.children;return t.createElement(t.Fragment,{},n)}},p=t.forwardRef((function(e,n){var r=e.components,i=e.mdxType,o=e.originalType,c=e.parentName,u=a(e,["components","mdxType","originalType","parentName"]),d=l(r),p=i,m=d["".concat(c,".").concat(p)]||d[p]||s[p]||o;return r?t.createElement(m,f(f({ref:n},u),{},{components:r})):t.createElement(m,f({ref:n},u))}));function m(e,n){var r=arguments,i=n&&n.mdxType;if("string"==typeof e||i){var o=r.length,f=new Array(o);f[0]=p;var a={};for(var c in n)hasOwnProperty.call(n,c)&&(a[c]=n[c]);a.originalType=e,a[d]="string"==typeof e?e:i,f[1]=a;for(var l=2;l{r.r(n),r.d(n,{assets:()=>c,contentTitle:()=>f,default:()=>s,frontMatter:()=>o,metadata:()=>a,toc:()=>l});var t=r(7462),i=(r(7294),r(3905));const o={},f="Ring Buffer",a={unversionedId:"generic/ring_buffer",id:"generic/ring_buffer",title:"Ring Buffer",description:"A ring buffer is a data structure that efficiently manages a fixed-size, cyclically-referenced buffer, allowing for constant-time insertions and removals while overwriting the oldest data when full.",source:"@site/../documentation/generic/ring_buffer.md",sourceDirName:"generic",slug:"/generic/ring_buffer",permalink:"/Extended.Collections/generic/ring_buffer",draft:!1,editUrl:"https://github.com/ByronMayne/Extended.Collections/edit/main/documentation/generic/ring_buffer.md",tags:[],version:"current",lastUpdatedAt:1694476629,formattedLastUpdatedAt:"Sep 11, 2023",frontMatter:{},sidebar:"defaultSidebar",previous:{title:"Introduction",permalink:"/Extended.Collections/"},next:{title:"Ordered Dictionary",permalink:"/Extended.Collections/generic/specialized/ordered_dictionary"}},c={},l=[],u={toc:l},d="wrapper";function s(e){let{components:n,...r}=e;return(0,i.kt)(d,(0,t.Z)({},u,r,{components:n,mdxType:"MDXLayout"}),(0,i.kt)("h1",{id:"ring-buffer"},"Ring Buffer"),(0,i.kt)("p",null,"A ring buffer is a data structure that efficiently manages a fixed-size, cyclically-referenced buffer, allowing for constant-time insertions and removals while overwriting the oldest data when full."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-csharp",metastring:"title=RingBufferSandbox.cs",title:"RingBufferSandbox.cs"},'using Extended.Collections.Generic;\n\nnamespace Extended.Collections.Playground.Generic\n{\n public class RingBufferSandbox : Sandbox\n {\n private readonly RingBuffer m_buffer;\n\n public RingBufferSandbox()\n {\n m_buffer = new RingBuffer(3);\n }\n\n protected override void Run()\n {\n m_buffer.Add("A");\n m_buffer.Add("B");\n m_buffer.Add("C");\n Logger.Information("1. {Buffer}", m_buffer); // 1. [ "A", "B", "C" ]\n\n m_buffer.Add("D");\n Logger.Information("2. {Buffer}", m_buffer); // 2. [ "B", "C", "D" ]\n\n m_buffer.Remove("C");\n Logger.Information("3. {Buffer}", m_buffer); // 3. [ "B", "D" ]\n\n m_buffer.Add("E");\n Logger.Information("4. {Buffer}", m_buffer); // 4. [ "B", "D", "E" ]\n\n m_buffer.Clear();\n Logger.Information("5. {Buffer}", m_buffer); // [ ]\n }\n }\n}\n')))}s.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/8cbb5538.e291620a.js b/assets/js/8cbb5538.b7c5b399.js similarity index 98% rename from assets/js/8cbb5538.e291620a.js rename to assets/js/8cbb5538.b7c5b399.js index e0eefa7..e417fb2 100644 --- a/assets/js/8cbb5538.e291620a.js +++ b/assets/js/8cbb5538.b7c5b399.js @@ -1 +1 @@ -"use strict";(self.webpackChunkextended_collections=self.webpackChunkextended_collections||[]).push([[192],{3905:(e,t,n)=>{n.d(t,{Zo:()=>s,kt:()=>y});var r=n(7294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var c=r.createContext({}),d=function(e){var t=r.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},s=function(e){var t=d(e.components);return r.createElement(c.Provider,{value:t},e.children)},p="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},f=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,c=e.parentName,s=l(e,["components","mdxType","originalType","parentName"]),p=d(n),f=a,y=p["".concat(c,".").concat(f)]||p[f]||u[f]||i;return n?r.createElement(y,o(o({ref:t},s),{},{components:n})):r.createElement(y,o({ref:t},s))}));function y(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,o=new Array(i);o[0]=f;var l={};for(var c in t)hasOwnProperty.call(t,c)&&(l[c]=t[c]);l.originalType=e,l[p]="string"==typeof e?e:a,o[1]=l;for(var d=2;d{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>o,default:()=>u,frontMatter:()=>i,metadata:()=>l,toc:()=>d});var r=n(7462),a=(n(7294),n(3905));const i={sidebar_position:1},o="Introduction",l={unversionedId:"index",id:"index",title:"Introduction",description:"Collections Extended a zero dependency netstandard library that contains an array of different generic collections to use in any application. Each collection has it's own use",source:"@site/../documentation/index.md",sourceDirName:".",slug:"/",permalink:"/Extended.Collections/",draft:!1,editUrl:"https://github.com/ByronMayne/Extended.Collections/edit/main/documentation/index.md",tags:[],version:"current",lastUpdatedAt:1694476038,formattedLastUpdatedAt:"Sep 11, 2023",sidebarPosition:1,frontMatter:{sidebar_position:1},sidebar:"defaultSidebar",next:{title:"Ring Buffer",permalink:"/Extended.Collections/generic/ring_buffer"}},c={},d=[{value:"Collections",id:"collections",level:2}],s={toc:d},p="wrapper";function u(e){let{components:t,...n}=e;return(0,a.kt)(p,(0,r.Z)({},s,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"introduction"},"Introduction"),(0,a.kt)("p",null,"Collections Extended a zero dependency ",(0,a.kt)("em",{parentName:"p"},"netstandard")," library that contains an array of different generic collections to use in any application. Each collection has it's own use\ncase and is fully covered in unit tests giving you confidence they they work. "),(0,a.kt)("p",null,"Have a collection type that you would want to add? Feel free to make a pull request."),(0,a.kt)("h2",{id:"collections"},"Collections"),(0,a.kt)("table",null,(0,a.kt)("thead",{parentName:"table"},(0,a.kt)("tr",{parentName:"thead"},(0,a.kt)("th",{parentName:"tr",align:null},"Name"),(0,a.kt)("th",{parentName:"tr",align:null},"Type Name"),(0,a.kt)("th",{parentName:"tr",align:null},"Description"))),(0,a.kt)("tbody",{parentName:"table"},(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("a",{parentName:"td",href:"/Extended.Collections/generic/ring_buffer"},"Ring Buffer")),(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("inlineCode",{parentName:"td"},"Collections.Extended.Generic.RingBuffer")),(0,a.kt)("td",{parentName:"tr",align:null},"A ring buffer efficiently manages a fixed-size, cyclically-referenced buffer, allowing for constant-time insertions and removals while overwriting the oldest data when full.")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("a",{parentName:"td",href:"/Extended.Collections/generic/specialized/ordered_dictionary"},"OrderedDictionary")),(0,a.kt)("td",{parentName:"tr",align:null},"'Extended.Collections.Generic.Specialized.OrderedDictionary"),(0,a.kt)("td",{parentName:"tr",align:null},"Combines the features of a dictionary and a list, allowing key-value pairs to be stored in a specific order and accessed efficiently by their keys.")))))}u.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkextended_collections=self.webpackChunkextended_collections||[]).push([[192],{3905:(e,t,n)=>{n.d(t,{Zo:()=>s,kt:()=>y});var r=n(7294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var c=r.createContext({}),d=function(e){var t=r.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},s=function(e){var t=d(e.components);return r.createElement(c.Provider,{value:t},e.children)},p="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},f=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,c=e.parentName,s=l(e,["components","mdxType","originalType","parentName"]),p=d(n),f=a,y=p["".concat(c,".").concat(f)]||p[f]||u[f]||i;return n?r.createElement(y,o(o({ref:t},s),{},{components:n})):r.createElement(y,o({ref:t},s))}));function y(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,o=new Array(i);o[0]=f;var l={};for(var c in t)hasOwnProperty.call(t,c)&&(l[c]=t[c]);l.originalType=e,l[p]="string"==typeof e?e:a,o[1]=l;for(var d=2;d{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>o,default:()=>u,frontMatter:()=>i,metadata:()=>l,toc:()=>d});var r=n(7462),a=(n(7294),n(3905));const i={sidebar_position:1},o="Introduction",l={unversionedId:"index",id:"index",title:"Introduction",description:"Collections Extended a zero dependency netstandard library that contains an array of different generic collections to use in any application. Each collection has it's own use",source:"@site/../documentation/index.md",sourceDirName:".",slug:"/",permalink:"/Extended.Collections/",draft:!1,editUrl:"https://github.com/ByronMayne/Extended.Collections/edit/main/documentation/index.md",tags:[],version:"current",lastUpdatedAt:1694476629,formattedLastUpdatedAt:"Sep 11, 2023",sidebarPosition:1,frontMatter:{sidebar_position:1},sidebar:"defaultSidebar",next:{title:"Ring Buffer",permalink:"/Extended.Collections/generic/ring_buffer"}},c={},d=[{value:"Collections",id:"collections",level:2}],s={toc:d},p="wrapper";function u(e){let{components:t,...n}=e;return(0,a.kt)(p,(0,r.Z)({},s,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"introduction"},"Introduction"),(0,a.kt)("p",null,"Collections Extended a zero dependency ",(0,a.kt)("em",{parentName:"p"},"netstandard")," library that contains an array of different generic collections to use in any application. Each collection has it's own use\ncase and is fully covered in unit tests giving you confidence they they work. "),(0,a.kt)("p",null,"Have a collection type that you would want to add? Feel free to make a pull request."),(0,a.kt)("h2",{id:"collections"},"Collections"),(0,a.kt)("table",null,(0,a.kt)("thead",{parentName:"table"},(0,a.kt)("tr",{parentName:"thead"},(0,a.kt)("th",{parentName:"tr",align:null},"Name"),(0,a.kt)("th",{parentName:"tr",align:null},"Type Name"),(0,a.kt)("th",{parentName:"tr",align:null},"Description"))),(0,a.kt)("tbody",{parentName:"table"},(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("a",{parentName:"td",href:"/Extended.Collections/generic/ring_buffer"},"Ring Buffer")),(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("inlineCode",{parentName:"td"},"Collections.Extended.Generic.RingBuffer")),(0,a.kt)("td",{parentName:"tr",align:null},"A ring buffer efficiently manages a fixed-size, cyclically-referenced buffer, allowing for constant-time insertions and removals while overwriting the oldest data when full.")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("a",{parentName:"td",href:"/Extended.Collections/generic/specialized/ordered_dictionary"},"OrderedDictionary")),(0,a.kt)("td",{parentName:"tr",align:null},"'Extended.Collections.Generic.Specialized.OrderedDictionary"),(0,a.kt)("td",{parentName:"tr",align:null},"Combines the features of a dictionary and a list, allowing key-value pairs to be stored in a specific order and accessed efficiently by their keys.")))))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/runtime~main.cb7e6077.js b/assets/js/runtime~main.d4ec65d3.js similarity index 96% rename from assets/js/runtime~main.cb7e6077.js rename to assets/js/runtime~main.d4ec65d3.js index 0b800ba..123e186 100644 --- a/assets/js/runtime~main.cb7e6077.js +++ b/assets/js/runtime~main.d4ec65d3.js @@ -1 +1 @@ -(()=>{"use strict";var e,t,r,o,n,a={},f={};function d(e){var t=f[e];if(void 0!==t)return t.exports;var r=f[e]={exports:{}};return a[e].call(r.exports,r,r.exports,d),r.exports}d.m=a,e=[],d.O=(t,r,o,n)=>{if(!r){var a=1/0;for(l=0;l=n)&&Object.keys(d.O).every((e=>d.O[e](r[i])))?r.splice(i--,1):(f=!1,n0&&e[l-1][2]>n;l--)e[l]=e[l-1];e[l]=[r,o,n]},d.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return d.d(t,{a:t}),t},r=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,d.t=function(e,o){if(1&o&&(e=this(e)),8&o)return e;if("object"==typeof e&&e){if(4&o&&e.__esModule)return e;if(16&o&&"function"==typeof e.then)return e}var n=Object.create(null);d.r(n);var a={};t=t||[null,r({}),r([]),r(r)];for(var f=2&o&&e;"object"==typeof f&&!~t.indexOf(f);f=r(f))Object.getOwnPropertyNames(f).forEach((t=>a[t]=()=>e[t]));return a.default=()=>e,d.d(n,a),n},d.d=(e,t)=>{for(var r in t)d.o(t,r)&&!d.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},d.f={},d.e=e=>Promise.all(Object.keys(d.f).reduce(((t,r)=>(d.f[r](e,t),t)),[])),d.u=e=>"assets/js/"+({21:"418073dd",53:"935f2afb",102:"6794d4cd",127:"ede3a018",192:"8cbb5538",285:"246f2c6f",333:"1f958b60",514:"1be78505",524:"e26cfe93",609:"15f4476d",616:"946bd85a",627:"23abe487",843:"68e633d4",918:"17896441",983:"ba8b3534"}[e]||e)+"."+{21:"b9152ad9",53:"cdddb7b8",102:"88571500",127:"1a4ef5de",192:"e291620a",285:"87ba33c6",333:"30c05832",368:"cf67e7b1",514:"712442a1",524:"b9e519eb",609:"d5f9555a",616:"b86f1f03",627:"5c18fe8c",843:"781ef39d",918:"1ce773d5",972:"6f65d534",983:"4901bbe6"}[e]+".js",d.miniCssF=e=>{},d.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),d.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o={},n="extended-collections:",d.l=(e,t,r,a)=>{if(o[e])o[e].push(t);else{var f,i;if(void 0!==r)for(var c=document.getElementsByTagName("script"),l=0;l{f.onerror=f.onload=null,clearTimeout(b);var n=o[e];if(delete o[e],f.parentNode&&f.parentNode.removeChild(f),n&&n.forEach((e=>e(r))),t)return t(r)},b=setTimeout(s.bind(null,void 0,{type:"timeout",target:f}),12e4);f.onerror=s.bind(null,f.onerror),f.onload=s.bind(null,f.onload),i&&document.head.appendChild(f)}},d.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},d.p="/Extended.Collections/",d.gca=function(e){return e={17896441:"918","418073dd":"21","935f2afb":"53","6794d4cd":"102",ede3a018:"127","8cbb5538":"192","246f2c6f":"285","1f958b60":"333","1be78505":"514",e26cfe93:"524","15f4476d":"609","946bd85a":"616","23abe487":"627","68e633d4":"843",ba8b3534:"983"}[e]||e,d.p+d.u(e)},(()=>{var e={303:0,532:0};d.f.j=(t,r)=>{var o=d.o(e,t)?e[t]:void 0;if(0!==o)if(o)r.push(o[2]);else if(/^(303|532)$/.test(t))e[t]=0;else{var n=new Promise(((r,n)=>o=e[t]=[r,n]));r.push(o[2]=n);var a=d.p+d.u(t),f=new Error;d.l(a,(r=>{if(d.o(e,t)&&(0!==(o=e[t])&&(e[t]=void 0),o)){var n=r&&("load"===r.type?"missing":r.type),a=r&&r.target&&r.target.src;f.message="Loading chunk "+t+" failed.\n("+n+": "+a+")",f.name="ChunkLoadError",f.type=n,f.request=a,o[1](f)}}),"chunk-"+t,t)}},d.O.j=t=>0===e[t];var t=(t,r)=>{var o,n,a=r[0],f=r[1],i=r[2],c=0;if(a.some((t=>0!==e[t]))){for(o in f)d.o(f,o)&&(d.m[o]=f[o]);if(i)var l=i(d)}for(t&&t(r);c{"use strict";var e,t,r,o,n,a={},f={};function d(e){var t=f[e];if(void 0!==t)return t.exports;var r=f[e]={exports:{}};return a[e].call(r.exports,r,r.exports,d),r.exports}d.m=a,e=[],d.O=(t,r,o,n)=>{if(!r){var a=1/0;for(l=0;l=n)&&Object.keys(d.O).every((e=>d.O[e](r[i])))?r.splice(i--,1):(f=!1,n0&&e[l-1][2]>n;l--)e[l]=e[l-1];e[l]=[r,o,n]},d.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return d.d(t,{a:t}),t},r=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,d.t=function(e,o){if(1&o&&(e=this(e)),8&o)return e;if("object"==typeof e&&e){if(4&o&&e.__esModule)return e;if(16&o&&"function"==typeof e.then)return e}var n=Object.create(null);d.r(n);var a={};t=t||[null,r({}),r([]),r(r)];for(var f=2&o&&e;"object"==typeof f&&!~t.indexOf(f);f=r(f))Object.getOwnPropertyNames(f).forEach((t=>a[t]=()=>e[t]));return a.default=()=>e,d.d(n,a),n},d.d=(e,t)=>{for(var r in t)d.o(t,r)&&!d.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},d.f={},d.e=e=>Promise.all(Object.keys(d.f).reduce(((t,r)=>(d.f[r](e,t),t)),[])),d.u=e=>"assets/js/"+({21:"418073dd",53:"935f2afb",102:"6794d4cd",127:"ede3a018",192:"8cbb5538",285:"246f2c6f",333:"1f958b60",514:"1be78505",524:"e26cfe93",609:"15f4476d",616:"946bd85a",627:"23abe487",843:"68e633d4",918:"17896441",983:"ba8b3534"}[e]||e)+"."+{21:"c40a4141",53:"cdddb7b8",102:"88571500",127:"1a4ef5de",192:"b7c5b399",285:"4ed86aaa",333:"22f2200b",368:"cf67e7b1",514:"712442a1",524:"b9e519eb",609:"d5f9555a",616:"b86f1f03",627:"5c18fe8c",843:"781ef39d",918:"1ce773d5",972:"6f65d534",983:"4901bbe6"}[e]+".js",d.miniCssF=e=>{},d.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),d.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o={},n="extended-collections:",d.l=(e,t,r,a)=>{if(o[e])o[e].push(t);else{var f,i;if(void 0!==r)for(var c=document.getElementsByTagName("script"),l=0;l{f.onerror=f.onload=null,clearTimeout(b);var n=o[e];if(delete o[e],f.parentNode&&f.parentNode.removeChild(f),n&&n.forEach((e=>e(r))),t)return t(r)},b=setTimeout(s.bind(null,void 0,{type:"timeout",target:f}),12e4);f.onerror=s.bind(null,f.onerror),f.onload=s.bind(null,f.onload),i&&document.head.appendChild(f)}},d.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},d.p="/Extended.Collections/",d.gca=function(e){return e={17896441:"918","418073dd":"21","935f2afb":"53","6794d4cd":"102",ede3a018:"127","8cbb5538":"192","246f2c6f":"285","1f958b60":"333","1be78505":"514",e26cfe93:"524","15f4476d":"609","946bd85a":"616","23abe487":"627","68e633d4":"843",ba8b3534:"983"}[e]||e,d.p+d.u(e)},(()=>{var e={303:0,532:0};d.f.j=(t,r)=>{var o=d.o(e,t)?e[t]:void 0;if(0!==o)if(o)r.push(o[2]);else if(/^(303|532)$/.test(t))e[t]=0;else{var n=new Promise(((r,n)=>o=e[t]=[r,n]));r.push(o[2]=n);var a=d.p+d.u(t),f=new Error;d.l(a,(r=>{if(d.o(e,t)&&(0!==(o=e[t])&&(e[t]=void 0),o)){var n=r&&("load"===r.type?"missing":r.type),a=r&&r.target&&r.target.src;f.message="Loading chunk "+t+" failed.\n("+n+": "+a+")",f.name="ChunkLoadError",f.type=n,f.request=a,o[1](f)}}),"chunk-"+t,t)}},d.O.j=t=>0===e[t];var t=(t,r)=>{var o,n,a=r[0],f=r[1],i=r[2],c=0;if(a.some((t=>0!==e[t]))){for(o in f)d.o(f,o)&&(d.m[o]=f[o]);if(i)var l=i(d)}for(t&&t(r);c Ring Buffer | Extended.Collections - +
-

Ring Buffer

A ring buffer is a data structure that efficiently manages a fixed-size, cyclically-referenced buffer, allowing for constant-time insertions and removals while overwriting the oldest data when full.

RingBufferSandbox.cs
using Extended.Collections.Generic;

namespace Extended.Collections.Playground.Generic
{
public class RingBufferSandbox : Sandbox
{
private readonly RingBuffer<string> m_buffer;

public RingBufferSandbox()
{
m_buffer = new RingBuffer<string>(3);
}

protected override void Run()
{
m_buffer.Add("A");
m_buffer.Add("B");
m_buffer.Add("C");
Logger.Information("1. {Buffer}", m_buffer); // 1. [ "A", "B", "C" ]

m_buffer.Add("D");
Logger.Information("2. {Buffer}", m_buffer); // 2. [ "B", "C", "D" ]

m_buffer.Remove("C");
Logger.Information("3. {Buffer}", m_buffer); // 3. [ "B", "D" ]

m_buffer.Add("E");
Logger.Information("4. {Buffer}", m_buffer); // 4. [ "B", "D", "E" ]

m_buffer.Clear();
Logger.Information("5. {Buffer}", m_buffer); // [ ]
}
}
}
- +

Ring Buffer

A ring buffer is a data structure that efficiently manages a fixed-size, cyclically-referenced buffer, allowing for constant-time insertions and removals while overwriting the oldest data when full.

RingBufferSandbox.cs
using Extended.Collections.Generic;

namespace Extended.Collections.Playground.Generic
{
public class RingBufferSandbox : Sandbox
{
private readonly RingBuffer<string> m_buffer;

public RingBufferSandbox()
{
m_buffer = new RingBuffer<string>(3);
}

protected override void Run()
{
m_buffer.Add("A");
m_buffer.Add("B");
m_buffer.Add("C");
Logger.Information("1. {Buffer}", m_buffer); // 1. [ "A", "B", "C" ]

m_buffer.Add("D");
Logger.Information("2. {Buffer}", m_buffer); // 2. [ "B", "C", "D" ]

m_buffer.Remove("C");
Logger.Information("3. {Buffer}", m_buffer); // 3. [ "B", "D" ]

m_buffer.Add("E");
Logger.Information("4. {Buffer}", m_buffer); // 4. [ "B", "D", "E" ]

m_buffer.Clear();
Logger.Information("5. {Buffer}", m_buffer); // [ ]
}
}
}
+ \ No newline at end of file diff --git a/generic/specialized/ordered_dictionary.html b/generic/specialized/ordered_dictionary.html index e0b2a4b..318aa47 100644 --- a/generic/specialized/ordered_dictionary.html +++ b/generic/specialized/ordered_dictionary.html @@ -4,13 +4,13 @@ Ordered Dictionary | Extended.Collections - +
-

Ordered Dictionary

Combines the features of a dictionary and a list, allowing key-value pairs to be stored in a specific order and accessed efficiently by their keys.

Pros:

  • Maintains the order of key-value pairs, which can be useful for scenarios where the order of insertion or access is important.
  • Provides the functionality of a dictionary, allowing for fast key-based lookups.
  • Supports generic TKey and TValue types, making it flexible for various data types.

Cons:

  • Slightly higher memory usage compared to a regular dictionary due to the need to store the order of items.
  • Some operations may be slower compared to a regular dictionary due to maintaining the order.

Hypothetical Use Case:

Suppose you are building a task management application, and you need to maintain a list of tasks for a project while preserving the order in which they were added. An OrderedDictionary can be useful in this scenario to store and manage tasks associated with a project.

using System;
using System.Collections.Specialized;

class Program
{
static void Main()
{
// Create an OrderedDictionary to store tasks for a project.
OrderedDictionary<string, string> projectTasks = new OrderedDictionary<string, string>();

// Add tasks to the project in a specific order.
projectTasks.Add("Task1", "Complete research");
projectTasks.Add("Task2", "Write documentation");
projectTasks.Add("Task3", "Test functionality");

// Access tasks by their keys while maintaining their order.
Console.WriteLine("Project Tasks:");
foreach (DictionaryEntry entry in projectTasks)
{
Console.WriteLine($"{entry.Key}: {entry.Value}");
}
}
}
- +

Ordered Dictionary

Combines the features of a dictionary and a list, allowing key-value pairs to be stored in a specific order and accessed efficiently by their keys.

Pros:

  • Maintains the order of key-value pairs, which can be useful for scenarios where the order of insertion or access is important.
  • Provides the functionality of a dictionary, allowing for fast key-based lookups.
  • Supports generic TKey and TValue types, making it flexible for various data types.

Cons:

  • Slightly higher memory usage compared to a regular dictionary due to the need to store the order of items.
  • Some operations may be slower compared to a regular dictionary due to maintaining the order.

Hypothetical Use Case:

Suppose you are building a task management application, and you need to maintain a list of tasks for a project while preserving the order in which they were added. An OrderedDictionary can be useful in this scenario to store and manage tasks associated with a project.

using System;
using System.Collections.Specialized;

class Program
{
static void Main()
{
// Create an OrderedDictionary to store tasks for a project.
OrderedDictionary<string, string> projectTasks = new OrderedDictionary<string, string>();

// Add tasks to the project in a specific order.
projectTasks.Add("Task1", "Complete research");
projectTasks.Add("Task2", "Write documentation");
projectTasks.Add("Task3", "Test functionality");

// Access tasks by their keys while maintaining their order.
Console.WriteLine("Project Tasks:");
foreach (DictionaryEntry entry in projectTasks)
{
Console.WriteLine($"{entry.Key}: {entry.Value}");
}
}
}
+ \ No newline at end of file diff --git a/index.html b/index.html index 07a7ebe..7d22ffc 100644 --- a/index.html +++ b/index.html @@ -4,14 +4,14 @@ Introduction | Extended.Collections - +

Introduction

Collections Extended a zero dependency netstandard library that contains an array of different generic collections to use in any application. Each collection has it's own use -case and is fully covered in unit tests giving you confidence they they work.

Have a collection type that you would want to add? Feel free to make a pull request.

Collections

NameType NameDescription
Ring BufferCollections.Extended.Generic.RingBuffer<T>A ring buffer efficiently manages a fixed-size, cyclically-referenced buffer, allowing for constant-time insertions and removals while overwriting the oldest data when full.
OrderedDictionary'Extended.Collections.Generic.Specialized.OrderedDictionary<TKey, TValue>Combines the features of a dictionary and a list, allowing key-value pairs to be stored in a specific order and accessed efficiently by their keys.
- +case and is fully covered in unit tests giving you confidence they they work.

Have a collection type that you would want to add? Feel free to make a pull request.

Collections

NameType NameDescription
Ring BufferCollections.Extended.Generic.RingBuffer<T>A ring buffer efficiently manages a fixed-size, cyclically-referenced buffer, allowing for constant-time insertions and removals while overwriting the oldest data when full.
OrderedDictionary'Extended.Collections.Generic.Specialized.OrderedDictionary<TKey, TValue>Combines the features of a dictionary and a list, allowing key-value pairs to be stored in a specific order and accessed efficiently by their keys.
+ \ No newline at end of file