{"id":20851115,"url":"https://github.com/chakravala/staticvectors.jl","last_synced_at":"2025-12-27T00:49:23.248Z","repository":{"id":111794186,"uuid":"583127232","full_name":"chakravala/StaticVectors.jl","owner":"chakravala","description":"Statically sized tuple vectors for Julia","archived":false,"fork":false,"pushed_at":"2024-04-23T10:42:56.000Z","size":87,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-05-02T03:19:54.905Z","etag":null,"topics":[],"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/chakravala.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-12-28T21:10:24.000Z","updated_at":"2024-06-22T19:29:12.372Z","dependencies_parsed_at":null,"dependency_job_id":"2df802ed-ee8c-4313-a4c7-fa7373bbed76","html_url":"https://github.com/chakravala/StaticVectors.jl","commit_stats":null,"previous_names":["chakravala/staticvectors.jl"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chakravala%2FStaticVectors.jl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chakravala%2FStaticVectors.jl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chakravala%2FStaticVectors.jl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chakravala%2FStaticVectors.jl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chakravala","download_url":"https://codeload.github.com/chakravala/StaticVectors.jl/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243222184,"owners_count":20256220,"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":[],"created_at":"2024-11-18T03:12:29.787Z","updated_at":"2025-12-27T00:49:23.198Z","avatar_url":"https://github.com/chakravala.png","language":"Julia","funding_links":[],"categories":[],"sub_categories":[],"readme":"# StaticVectors.jl\n\n*Statically sized tuple vectors for Julia*\n\nSubtypes of `TupleVector` are provided as a light weight alternative to [StaticArrays.jl](https://github.com/JuliaArrays/StaticArrays.jl).\nThis package was created for use in [AbstractTensors.jl](https://github.com/chakravala/AbstractTensors.jl), [Grassmann.jl](https://github.com/chakravala/Grassmann.jl), [FieldAlgebra.jl](https://github.com/chakravala/FieldAlgebra.jl), [Similitude.jl](https://github.com/chakravala/Similitude.jl), [Geophysics.jl](https://github.com/chakravala/Geophysics.jl), and various other related repositories developed by [chakravala](https://github.com/chakravala).\n\n**TupleVector** provides a framework for implementing statically sized tuple vectors\nin Julia, using the abstract type `TupleVector{N,T} \u003c: AbstractVector{T}`.\nSubtypes of `TupleVector` will provide fast implementations of common array and\nlinear algebra operations. Note that here \"statically sized\" means that the\nsize can be determined from the *type*, and \"static\" does **not** necessarily\nimply `immutable`.\n\nThe package also provides some concrete static vector types: `Values` which may be used as-is (or else embedded in your own type).\nMutable versions `Variables` are also exported, as well\nas `FixedVector` for annotating standard `Vector`s with static size information.\n\nIf the environment variable `STATICJL` is set, then `StaticArrays` is loaded instead.\n\n### Quick start\n\nAdd *StaticVectors* from the [Pkg REPL](https://docs.julialang.org/en/latest/stdlib/Pkg/#Getting-Started-1), i.e., `pkg\u003e add StaticVectors`. Then:\n```julia\nusing StaticVectors\n\n# Create Values using various forms, using constructors, functions or macros\nv1 = Values(1, 2, 3)\nv1.v === (1, 2, 3) # Values uses a tuple for internal storage\nv2 = Values{3,Float64}(1, 2, 3) # length 3, eltype Float64\nv5 = zeros(Values{3}) # defaults to Float64\nv7 = Values{3}([1, 2, 3]) # Array conversions must specify size\n\n# Can get size() from instance or type\nsize(v1) == (3,)\nsize(typeof(v1)) == (3,)\n\n# Supports all the common operations of AbstractVector\nv7 = v1 + v2\nv8 = sin.(v2)\n\n# Indexing can also be done using static vectors of integers\nv1[1] === 1\nv1[:] === v1\ntypeof(v1[[1,2,3]]) \u003c: Vector # Can't determine size from the type of [1,2,3]\n```\n\n### Approach\n\nThe package provides a range of different useful built-in `TupleVector` types,\nwhich include mutable and immutable vectors based upon tuples, vectors based upon\nstructs, and wrappers of `Vector`. There is a relatively simple interface for\ncreating your own, custom `TupleVector` types, too.\n\nThis package also provides methods for a wide range of `AbstractVector` functions,\nspecialized for (potentially immutable) `TupleVector`s. Many of Julia's\nbuilt-in method definitions inherently assume mutability, and further\nperformance optimizations may be made when the size of the vector is known to the\ncompiler. One example of this is by loop unrolling, which has a substantial\neffect on small arrays and tends to automatically trigger LLVM's SIMD\noptimizations. In combination with intelligent fallbacks to\nthe methods in Base, we seek to provide a comprehensive support for statically\nsized vectors, large or small, that hopefully \"just works\".\n\n`TupleVector` is directly inspired from [StaticArrays.jl](https://github.com/JuliaArrays/StaticArrays.jl).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchakravala%2Fstaticvectors.jl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchakravala%2Fstaticvectors.jl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchakravala%2Fstaticvectors.jl/lists"}