{"id":19588919,"url":"https://github.com/wangl-cc/resizingtools.jl","last_synced_at":"2026-06-18T14:33:01.829Z","repository":{"id":43354888,"uuid":"405365485","full_name":"wangl-cc/ResizingTools.jl","owner":"wangl-cc","description":"Framework to create resizable arrays.","archived":false,"fork":false,"pushed_at":"2022-03-06T09:27:04.000Z","size":934,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-20T22:29:04.753Z","etag":null,"topics":["array","julia","resize"],"latest_commit_sha":null,"homepage":"","language":"Julia","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wangl-cc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-09-11T11:50:37.000Z","updated_at":"2022-01-11T03:08:40.000Z","dependencies_parsed_at":"2022-08-27T10:40:42.462Z","dependency_job_id":null,"html_url":"https://github.com/wangl-cc/ResizingTools.jl","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wangl-cc%2FResizingTools.jl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wangl-cc%2FResizingTools.jl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wangl-cc%2FResizingTools.jl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wangl-cc%2FResizingTools.jl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wangl-cc","download_url":"https://codeload.github.com/wangl-cc/ResizingTools.jl/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240860009,"owners_count":19869256,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["array","julia","resize"],"created_at":"2024-11-11T08:16:33.431Z","updated_at":"2026-06-18T14:33:01.802Z","avatar_url":"https://github.com/wangl-cc.png","language":"Julia","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ResizingTools.jl\n\n[![Build Status](https://github.com/wangl-cc/ResizingTools.jl/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/wangl-cc/ResizingTools.jl/actions/workflows/ci.yml)\n[![codecov](https://codecov.io/gh/wangl-cc/ResizingTools.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/wangl-cc/ResizingTools.jl)\n[![GitHub](https://img.shields.io/github/license/wangl-cc/ResizingTools.jl)](https://github.com/wangl-cc/ResizingTools.jl/blob/master/LICENSE)\n[![Docs dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://wangl-cc.github.io/ResizingTools.jl/dev/)\n[![Docs stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://wangl-cc.github.io/ResizingTools.jl/stable/)\n\n`ResizingTools` helps you create resizable `Array` types.\n\n## Get started with `SimpleRDArray`\n\n`SimpleRDArray` is a simple implementation of the resizable dense array, which\ncan be created simply:\n\n```julia\njulia\u003e M = reshape(1:9, 3, 3)\n3×3 reshape(::UnitRange{Int64}, 3, 3) with eltype Int64:\n 1  4  7\n 2  5  8\n 3  6  9\n\njulia\u003e RM = SimpleRDArray(M)\n3×3 SimpleRDArray{Int64, 2}:\n 1  4  7\n 2  5  8\n 3  6  9\n\njulia\u003e M == RM\ntrue\n```\n\nOnce a `SimpleRDArray` is created, you can almost do anything with which likes a\nnormal `Array` with similar performance:\n\n```julia\njulia\u003e @benchmark $RM * $RM\nBenchmarkTools.Trial: 10000 samples with 980 evaluations.\n Range (min … max):   77.283 ns … 26.663 μs  ┊ GC (min … max): 0.00% … 0.00%\n Time  (median):     214.530 ns              ┊ GC (median):    0.00%\n Time  (mean ± σ):   300.628 ns ±  1.292 μs  ┊ GC (mean ± σ):  6.87% ± 5.58%\n\n      █▂                                                        \n  ▁▁▁▆██▄▂▁▁▁▁▁▁▁▁▂▂▂▃▃▃▃▃▄▄▄▄▄▄▄▄▃▃▃▃▃▃▂▂▂▂▂▂▂▂▂▂▁▁▁▁▁▁▁▁▁▁▁▁ ▂\n  77.3 ns         Histogram: frequency by time          430 ns \u003c\n\n Memory estimate: 160 bytes, allocs estimate: 1.\n\njulia\u003e @benchmark $M * $M\nBenchmarkTools.Trial: 10000 samples with 980 evaluations.\n Range (min … max):   71.658 ns …   4.237 μs  ┊ GC (min … max): 0.00% … 94.53%\n Time  (median):     144.504 ns               ┊ GC (median):    0.00%\n Time  (mean ± σ):   161.228 ns ± 206.767 ns  ┊ GC (mean ± σ):  7.40% ±  5.60%\n\n              ▁▅▇█▇▅▂                                            \n  ▂▁▂▂▂▂▂▂▃▄▅▆███████▇▄▃▃▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂ ▃\n  71.7 ns          Histogram: frequency by time          356 ns \u003c\n Memory estimate: 160 bytes, allocs estimate: 1.\n\njulia\u003e RM * RM == M * M\ntrue\n```\n\nBesides, a `SimpleRDArray` can be resized in many ways:\n\n```julia\njulia\u003e resize!(RM, (4, 4)) # resize RM to 4 * 4\n4×4 SimpleRDArray{Int64, 2}:\n 1  4   7   81\n 2  5   8   96\n 3  6   9  102\n 4  8  66  126\n\njulia\u003e RM[1:3,1:3] == M\ntrue\njulia\u003e resize!(RM, 2, 3) # resize the 2nd dimension of RM to 3\n4×3 SimpleRDArray{Int64, 2}:\n 1  4   7\n 2  5   8\n 3  6   9\n 4  8  66\n\njulia\u003e RM[4, :] .= 0\n3-element view(::SimpleRDArray{Int64, 2}, 4, :) with eltype Int64:\n 0\n 0\n 0\n\njulia\u003e resize!(RM, 1, Bool[1, 1, 0, 1]) # delete RM[3, :]\n3×3 SimpleRDArray{Int64, 2}:\n 1  4  7\n 2  5  8\n 0  0  0\n```\n\n## Make your own array resizable\n\nTo make your own resizable array, you only need is defined some interface\nmethods, see\n[docs](https://wangl-cc.github.io/ResizingTools.jl/dev/manual/#Interfaces) for\ndetails.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwangl-cc%2Fresizingtools.jl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwangl-cc%2Fresizingtools.jl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwangl-cc%2Fresizingtools.jl/lists"}